Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (t - u) touch(1)
NAME
touch - Updates le access and modication times
SYNOPSIS
Current Syntax
touch [-acfm][-r reference_le | -t time] le ...
Obsolescent Syntax
touch [-acfm][time] le ...
The touch command updates the access and modication times of each le or directory named to
the time specied on the command line.
Do not use the touch command on les in the Guardian environment.
FLAGS
-a Changes only the access time.
-c Suppresses the creation of the le without any diagnostic messages.
-f Attempts to force the touch in spite of read and write permissions on a le. -f is actu-
ally a dummy ag; it is not used by the touch code, but is recognized by getopt().
-m Changes only the modication time.
-r reference_file
Uses the time of the le named by the pathname reference_le instead of the current
time.
-t time Uses the specied time instead of the current time. The time argument is a decimal
number in the following form:
[[CC]YY]MMDDhhmm[.SS]
The paired decimal numbers in the preceding syntax line represent the following:
CC The rst two digits of the year (the century).
YY The second two digits of the year (00-99).
MM The month of the year (01-12).
DD The day of the month (01-31).
hh The hour of the day (00-23).
mm The minute of the hour (00-59).
SS The second of the minute (00-61).
Both CC and YY are optional. If neither is specied, the current year is assumed. If YY
is specied, but CC is not, CC is derived as follows:
If YY is 69-99, CC is 19.
If YY is 00-68, CC is 20.
The resulting time is affected by the value of the TZ environment variable. If the
resulting time value precedes the Epoch, touch exits immediately with an error status.
The range of valid times past the Epoch extends to at least midnight 1 January 2000
UT.
527188-007 Hewlett-Packard Company 915