OS Manuals

/usr/bin/touch

GNU core utilities

From coreutils 9.12-r7 (os), captured 2026-11-05 by running touch --help (exit 0). permalink

Usage: /usr/bin/touch [OPTION]... FILE...
Update the access and modification times of each FILE to the current time.

A FILE argument that does not exist is created empty, unless -c or -h
is supplied.

A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.

Mandatory arguments to long options are mandatory for short options too.
  -a
         change only the access time
  -c, --no-create
         do not create any files
  -d, --date=STRING
         parse STRING and use it instead of current time
  -f
         (ignored)
  -h, --no-dereference
         affect each symbolic link instead of any referenced file;
         useful only on systems that can change the timestamps of a symlink
  -m
         change only the modification time
  -r, --reference=FILE
         use this file's times instead of current time
  -t [[CC]YY]MMDDhhmm[.ss]
         use specified time instead of current time,
         with a date-time format that differs from -d's
      --time=WORD
         specify which time to change:
         access time (-a): 'access', 'atime', 'use';
         modification time (-m): 'modify', 'mtime'
      --help
         display this help and exit
      --version
         output version information and exit

Report bugs to: <bug-coreutils@gnu.org>.
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Full documentation <https://www.gnu.org/software/coreutils/touch>
or available locally via: info '(coreutils) touch invocation'
Options (11)
OptionDescriptionSource
-achange only the access timehelp + man
-c, --no-createdo not create any fileshelp + man
-d, --date STRINGparse STRING and use it instead of current timehelp + man
-f(ignored)help + man
-h, --no-dereferenceaffect each symbolic link instead of any referenced file;help + man
-mchange only the modification timehelp + man
-r, --reference FILEuse this file's times instead of current timehelp + man
-t CC]YY]MMDDhhmm[.ssuse specified time instead of current time, with a date-time format that differs from -d'shelp
--time WORDspecify which time to change: access time (-a): 'access', 'atime', 'use';help + man
--helpdisplay this help and exithelp + man
--versionoutput version information and exithelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.