touch command is the most basic one which many people misunderstand. The touch command is used to modify timestamps on a file, but it actually gives the effect of creating a new file.
touch filename - will create an empty file
touch -a filename - change the access time only
touch -c filename - if the file does not exist, do not create it
touch -d filename - update the access and modification times
touch -m filename - change the modification time only
touch -r - use the access and modification timestamp of file
touch -t - creates a file using a specified time
it creates a file and also can modify the timestamps
touch
command is the most basic one which many people misunderstand. Thetouch
command is used to modify timestamps on a file, but it actually gives the effect of creating a new file.touch filename - will create an empty file
touch -a filename - change the access time only
touch -c filename - if the file does not exist, do not create it
touch -d filename - update the access and modification times
touch -m filename - change the modification time only
touch -r - use the access and modification timestamp of file
touch -t - creates a file using a specified time
it creates a file and also can modify the timestamps
Exactly!
most of the people will not use these options & they won't bother about timestamps, so I haven't mentioned them previously.