touchcommand updates the modification and access time of the a file. If the given file does not exists, it gets created.
touch [flags] [file1] [file2] ...
- -A: adjust the access and modification timestamps for the file by the specified value.
- -a: Change the access time of the file. The modification time of the file is not changed unless the -m flag is also specified.
- -c: Do not create the file if it does not exist.
- -f Attempt to force the update, even if the file permissions do not currently permit it.
- -h: If the file is a symbolic link, change the times of the link itself rather than the file that the link points to.
- -m: Change the modification time of the file. The access time of the file is not changed unless the -a flag is also specified.
- -t: Change the access and modification times to the specified time instead of the current time of day.