|Linux / Unix Command: touch|
touch [-acfm] [-r reference-file] [-t MMD-Dhhmm[[CC]YY][.ss]] [-d time]
[--file=reference-file] [--no-create] [--help] [--version]
Changes the date/time stamp of the file filename to the current time. Creates an empty file if the file does not exist. You can change the stamp to any date using
touch -t 200201311759.30 (year 2002 January day 31 time 17:59:30).
There are three date/time values associated with every file on an ext2 filesystem:
- the time of last access to the file (atime)
- the time of last modification to the file (mtime)
- the time of last change to the file's inode (ctime).
Touch will change the first two to the value specified, and the last one always to the current system time.
-a, --time=atime, --time=access, --time=use
Change the access time only.
Do not create files that do not exist.
-d, --date time
Use time (which can be in various common formats)
instead of the current time. It can contain month
names, timezones, `am' and `pm', etc.
-m, --time=mtime, --time=modify
Change the modification time only.
-r, --file reference-file
Use the times of reference-file instead of the cur-
Use the argument (months, days, hours, minutes,
optional century and years, optional seconds)
instead of the current time.
--help Print a usage message on standard output and exit
Print version information on standard output then
% touch analysis_data.xls
Changes the timestamp of file analysis_data.xls to the current time.
Important: Use the man command (% man) to see how a command is used on your particular computer.