TOUCH(1)
π¦ TOUCH(1) β User Contributed Perl Documentation, bestie edition π¦
πΈ NAME πΈ
touch β change access and modification times of files
β¨ SYNOPSIS β¨
touch [-acm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file...
π DESCRIPTION π
Okay so touch sets the access and modification timestamps of files. By default, both the access and modification times get set to the current time. And if the files donβt exist yet? If necessary, they will be created. Slay.
touch exits successfully if and only if all timestamps could be set successfully. No half victories, bestie β every single timestamp has to work.
π OPTIONS π
touch accepts the following options:
-aβ set the access time of the specified files only, unless-mis given as well.-cβ do not create non-existing files. No warning is generated, and it will not influence the exit status.-fβ this option is ignored, and only recognized for compatibility reasons.-mβ set the modification time of the specified files only, unless-ais given as well.-r fileβ use the access and modification time offileinstead of the current time.-t [[CC]YY]MMDDhhmm[.SS]β set the access and modification times to the specified time. IfYYis present, butCCis not, thenCCis assumed to be19ifYYis larger than69, and20otherwise. IfYYis 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. So likeβ¦ mind the era, okay? π
π± ENVIRONMENT π±
The working of touch is not influenced by any environment variables. None. Zero. Zilch. Environment stays out of this oneβs business.
π BUGS π
touch uses Time::Local to translate the time format to epoch seconds
β STANDARDS β
This touch implementation is compatible with the OpenBSD implementation.
π AUTHOR π
The Perl implementation of touch was written by Abigail, perlpowertools@abigail.be.
π COPYRIGHT and LICENSE π
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.
Thatβs the whole page, babe. Signing off with perl v5.42.2, dated 2026-02-15 πβ¨
π¦ where this page comes from
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms