touch — stdin stdout - file -- opt --help --version
touch [options
]files
The touch
command changes
two timestamps associated with a file: its modification time (when
the file’s data was last changed) and its access time (when the file
was last read). To set both timestamps to right now, run:
$ touch myfile
You can set these timestamps to arbitrary values, e.g.:
$ touch -d "November 18 1975" myfile
If a given file doesn’t exist, touch
creates it, a handy way to create
empty files.
|
Change the access time only. |
|
Change the modification time only. |
|
If the file doesn’t
exist, don’t create it (normally, |
|
Set the file’s
timestamp(s). A tremendous number of timestamp formats are
acceptable, from “12/28/2001 3pm” to “28-May” (the current
year is assumed, and a time of midnight) to “next tuesday
13:59” to “0” (midnight today). Experiment and check your
work with |
|
A less intelligent
way to set the file’s |
18.116.40.177