Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (4620 KB)
touch(1)NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | USAGE | ENVIRONMENT VARIABLES | EXIT STATUS | ATTRIBUTES | SEE ALSO | NOTES NAME
SYNOPSIS
touch [-acm] [date_time] file... settime [-f ref_file] [date_time] file... DESCRIPTIONThe touch utility sets the access and modification times of each file. The file operand is created if it does not already exist. The time used can be specified by -t time, by the corresponding time fields of the file referenced by -r ref_file, or by the date_time operand. If none of these are specified, touch uses the current time (the value returned by the time(2) function). If neither the -a nor -m options are specified, touch updates both the modification and access times. A user with write access to a file, but who is not the owner of the file or a super-user, can change the modification and access times of that file only to the current time. Attempts to set a specific time with touch will result in an error. The settime utility is equivalent to touch -c [date_time] file. OPTIONS
touchThe following options are supported for the touch utility: settimeOPERANDS
The following operands are supported for the touch and settime utilities: USAGESee largefile(5) for the description of the behavior of touch when encountering files greater than or equal to 2 Gbyte ( 231 bytes). ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of touch: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: ATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SEE ALSONOTESUsers familiar with the BSD environment will find that for the touch utility, the -f option is accepted but ignored. The -f option is unnecessary because touch will succeed for all files owned by the user regardless of the permissions on the files. NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | USAGE | ENVIRONMENT VARIABLES | EXIT STATUS | ATTRIBUTES | SEE ALSO | NOTES |
||||||||||||||||||||||