touch Linux Commands
What is Linux touch Command?
touch COMMAND:touch command is used to update last modified time and date of a file. It is also used to create a new empty file with current date and time.
touch [options] File
||update only the access time.
|| Modify the time by going back SECONDS seconds.
| -c, --no-create
|| do not create any files.
| -d, --date=STRING
|| parse STRING and use it instead of current time.
|| change only the modification time.
|| set time given by WORD: access atime use (same as -a) modify mtime (same as -m).
| -t STAMP
|| use [[CC]YY]MMDDhhmm[.ss] instead of current time.
In the above example, the command checks whether the file test.php already exists.
If exists, it just modifies the date and time of the file.
Else, it creates a new file named 'test.php' with the current date and time.