The Touch command has two features:
One is used to update the time label of the existing file to the current time of the system (the default), their data will remain intact;
The second is to create a new empty file.
Touch Common Command Parameters
-A change-only the access time-c,--no-create does not create any files-d,--date=string par Se STRING and use it instead of time-f (ignored)-H,--no-dereference affect each symbolic li NK instead of any referenced file (useful only on systems that can change the Timestamps of a symlink)-m change only for the modification time-r,--reference=file Use this FILE ' s Tim Es instead of current time-t STAMP use [[CC]YY]MMDDHHMM[.SS] instead of current Time--time=word C Hange The specified Time:word is access, atime, or Use:equivalent to-a WORD is modify or mtime:equivalent to-m--help Display this help and exit--version output version Informatio N and exit
Common Command Display
Touch: Create File1-file10 total of 10 files
Touch file{1..10}
Set the timestamp of the file
Touch-t 201810121230 hh.sh "-T in decimal number"
Update Log.log the same time as Log2012.log timestamp
Touch-r hh hh.sh "touch-r destination file source file"
Linux Touch Command Detailed