- REVISION HISTORY
- COPYRIGHT and LICENSE
touch -- change access and modification times of files.
touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file [files ...]
touch sets the access and modification timestamps of files. By default, both the access and modification times are set to the current time. If necessary, files will be created.
touch exits succesfully if and only if all timestamps could be set succesfully.
head accepts the following options:
Set the access time of the specified files only, unless -m is given as well.
Do not create non-existing files. No warning is generated, and it will not influence the exit status.
This option is ignored, and only recognized for compatability reasons.
Set the modification time of the specified files only, unless -a is given as well.
- -r file
Use the access and modification time of file instead of the current time.
- -t [[CC]YY]MMDDhhmm[.SS]
Set the access and modification times to the specified time. If YY is present, but CC is not, then CC is assumed to be 19 if YY is larger than 69, and 20 otherwise. If YY is not present, the current year is assumed.
It should be noted that many systems cannot deal with timestamps before Jan 1, 1970 or after Jan 19, 2038.
The working of touch is not influenced by any environment variables.
touch does not implement the -f option.
Time::Local to translate the time format to epoch seconds
This head implementation is compatible with the OpenBSD implementation, except for the -f option.
$Log: touch,v $ Revision 1.2 2004/08/05 14:17:44 cwest cleanup, new version number on website Revision 1.1 2004/07/23 20:10:18 cwest initial import Revision 1.1 1999/02/28 13:00:24 abigail Initial revision
The Perl implementation of touch was written by Abigail, firstname.lastname@example.org.
This program is copyright by Abigail 1999.
This program is free and open software. You may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to do the same.