touch [-acm][ -r ref_file| -t time] file...
The touch utility shall change the modification times, access times, or both of files. The modification time shall be equivalent to the value of the st_mtime member of the stat structure for a file, as described in the System Interfaces volume of IEEE Std 1003.1-2001; the access time shall be equivalent to the value of st_atime.
The time used can be specified by the -t time option-argument, the corresponding time fields of the file referenced by the -r ref_file option-argument, or the date_time operand, as specified in the following sections. If none of these are specified, touch shall use the current time (the value returned by the equivalent of the time() function defined in the System Interfaces volume of IEEE Std 1003.1-2001).
For each file operand, touch shall perform actions equivalent to the following functions defined in the System Interfaces volume of IEEE Std 1003.1-2001:
If file does not exist, a creat() function call is made with the file operand used as the path argument and the value of the bitwise-inclusive OR of S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, and S_IWOTH used as the mode argument.
The utime() function is called with the following arguments: <ol type="a">
The file operand is used as the path argument.
The utimbuf structure members actime and modtime are determined as described in the OPTIONS section.
The touch utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
The following options shall be supported:
[[CC]YY]MMDDhhmm[.SS]
where each two digits represents the following:
Both CC and YY shall be optional. If neither is given, the current year shall be assumed. If YY is specified, but CC is not, CC shall be derived as follows: