TOUCH(1)
π TOUCH(1) β User Commands
okay bestie, gather round, because touch is genuinely one of the most iconic little commands in the whole coreutils lineup and I refuse to let you sleep on it π
β¨ NAME β¨
touch β create file, or change file timestamps πΈ
π¦ SYNOPSIS π¦
touch [OPTION]... FILE...
π DESCRIPTION π
So the main character job here? Update the access and modification times of each FILE to the current time. That's it. That's the vibe. β¨
A FILE argument that does not exist gets created empty β unless -c or -h is supplied. (Cute, right? It'll just spawn the file for you out of nowhere like a little manifesting moment π§)
A FILE argument string of - is handled specially and causes touch to change the times of the file associated with standard output. yes really, the dash is doing something. it's giving mysterious. π
Mandatory arguments to long options are mandatory for short options too. (this applies everywhere, not just here β it's a whole coreutils mood)
π OPTIONS π
-aβ change only the access time β°-c,--no-createβ do not create any files π« (so if it's not there, it stays not there, no cap)-d,--date=STRINGβ parse STRING and use it instead of current time ποΈ-fβ (ignored) π yes bestie, literally ignored. it's here for history/vibes only-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 π·οΈ
π DATE STRING π
The --date=STRING is a mostly free format human readable date string, like "Sun, 29 Feb 2004 16:21:42 -0800" or "2004-02-29 16:21:42" or even "next Thursday". yeah. you can just say next Thursday. she understands. π
A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers.
An empty string indicates the beginning of the day. π
The date string format is more complex than is easily documented here but is fully described in the info documentation. (iykyk β go read the info page if you wanna go feral with it π)
π AUTHOR π
Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith. legends, all of them π
π REPORTING BUGS π
- 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/>
- Report any translation bugs to <https://translationproject.org/team/>
π₯ SEE ALSO π₯
- Full documentation <https://www.gnu.org/software/coreutils/touch>
- or available locally via:
info '(coreutils) touch invocation'
Packaged by Ubuntu (9.10-1ubuntu2) π§
Copyright Β© 2026 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. β οΈ (say it with me: no warranty, bestie)
okay that's the whole thing, mwah π and just so we're on the same page about whose version this is β it's GNU coreutils 9.10, from August 2026. slay, go touch some files πΈβ¨π
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms