TOUCH(1)

πŸ“¦
version 9.10 Β· 5 versions
, in ubuntu stonking

πŸ’… 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 😭


πŸ”₯ SEE ALSO πŸ”₯

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