What Is the Touch Command Used for in Linux?
Contents the Touch Command Is a Standard Command Used in Unix/Linux Operating System Which Is Used to Create, Change and Modify Timestamps of a File. What Is...
Contents
The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a file.
What is touch command in Unix examples?
10 practical examples of Touch command on Linux
- Create a blank file. …
- Create multiple files with touch. …
- Create lots and lots of files. …
- Avoid creating new files. …
- Change file access time – ‘a’ …
- Change the modified time ‘-m’ …
- Change access and modification time together. …
- Set a specific access/modify time instead of current time.
Why does touch create a file?
touch attempts to set the modified date of each file. This is done by reading a character from the file and writing it back. If a **file* does not exist, an attempt will be made to create it unless the -c option is specified. (I don’t know what touch did if the file was empty.