2. • touch command: It is used to create a file without any content. The
file created using touch command is empty. This command can be
used when the user doesn’t have data to store at the time of file
creation.
• Touch command Syntax to create a new file: You can create a single
file at a time using touch command.
• Syntax: touch file_name
3. • Touch command to create multiple files: Touch command can be used
to create the multiple numbers of files at the same time. These files
would be empty while creation.
• Syntax:
touch File1_name File2_name File3_name
4. • There are 3 kind of "timestamps":
• Access - the last time the file was read
• Modify - the last time the file was modified (content has
been modified)
• Change - the last time meta data of the file was changed
(e.g. permissions)
5. • Touch file_name /again reset time stamp
• Touch-a: To change or update the last access and change times of a
file called filename, use the -a option as follows. The following
command sets the current time and date on a file. If the filename
• file does not exist, it will create the new empty file with the name.
Touch –a filename
• touch -c : This command is used to check whether a file is created or
not. If not created then don’t create it. This command avoids creating
files.
• touch -c filename /update access , change, modification dates
6. • touch -m : This is used to change the modification time. It only
updates last modification time.
• touch-m filename /modification and change date
• touch -r : This command is used to use the timestamp of another file.
• touch -r second_file first_file (time from second to first) / access and
modification time—use current change time
7. • Create a File using a specified time
• If you would like to create a file with specified time other than the
current time, then the format should be.
• # touch -t YYMMDDHHMM.SS tecmint