title: Bash touch
Bash command: touch
Creates empty file if filename does not exist or modifies timestamps of existing files to current time.
This command can create multiple empty files in one line of code.
touch [options] filename
Commonly used options:
-tchange timestamp to specific date ((YYYYMMDDHHMM.SS)) instead of current time.
-ruse timestamp from first file to second file.
-aIn case you want to only change the access time, use the -a command line option.
-mSimilarly, if the requirement is to only change the modification time, use the -m command line option.
-hIs useful if you only want to change the symbolic link, instead of the referenced file.
touch -t YYYYMMDDHHMM.SS filename
touch -r file1 file2
touch -am file3