touch -- change file access and modification times
touch [-acfm] [-r referenceFile] [-t [[CC]YY]MMDDhhmm[.SS]] file …
Sets the modification and access times of files to the current time of day.
If the file doesn't exist, it is created with default permissions.
| Change the modification time only
|Change the access time only
| Do not create the file if it does not exist and do not treat this as an error. No error messages are displayed and the exit value is not affected.
| Attempt to force the update, even if the file permissions do not currently permit it.
| Use the times of |
| Change the access and modification times.
Century defaults to the current year. seconds defaults to 0.
| first two digits of the year (the century).
| second two digits of the year. |
YY is specified, but
CC is not, a value for
YY between 69 and 99 results in
CC value of 19.
CC value of 20 is used.
Time may be specified as the first argument.
-t is specified, there are at least two
arguments, and the first argument is either 8 or 10 digits, of the form
YY is in the range 39 to 99, the
year is set to 1939-1999, otherwise, the year is set to 20YY
Notice that this is different from the ranges if
-t is specified.
The touch utility exits 0 on success, and >0 if an error occurs.
BSD April 28, 1995