touch(1)
NAME
touch − update access time and/or modification time of a file
SYNOPSIS
touch [ −amc ] [ mmddhhmm [ yy ] ] filename...
AVAILABILITY
SUNWcsu
DESCRIPTION
touch causes the access and modification times of each argument to be updated. The file name is created if it does not exist. If no time is specified (see date(1)) the current time is used.
The return code from touch is the number of files for which the times could not be successfully modified (including files that did not exist and were not created).
OPTIONS
−a touch updates only the access time respectively (default is −am).
−m touch updates only the modification time.
−c Silently prevents touch from creating the file if it did not previously exist.
ENVIRONMENT
If any of the LC_∗ variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of touch for each corresponding locale category is determined by the value of the LANG environment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_∗ variables. If none of the above variables is set in the environment, the "C" (U.S. style) locale determines how touch behaves.
LC_CTYPE
Determines how touch handles characters. When LC_CTYPE is set to a valid value, touch can display and handle text and filenames containing valid characters for that locale. touch can display and handle Extended Unix code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. touch can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
LC_MESSAGES
Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).
SEE ALSO
NOTES
Users familiar with the BSD environment will find that the −f option is accepted, but ignored. The −f option is unnecessary since touch will succeed for all files owned by the user regardless of the permissions on the files.
SunOS 5.1/SPARC — Last change: 14 Sep 1992