Create empty files and update timestamps in one fast command. 16.05.2026 | reading time: 2 min Need a placeholder file or want to refresh a timestamp? Use `touch` to create zero-length files or update access and modification times without opening an editor; it is simple, fast and script-friendly. Try this now Create an empty file and verify its existence: ```bash $ touch report.txt ``` Then inspect the file details: ```bash $ ls -l report.txt -rw-r--r-- 1 alice staff 0 May 16 12:00 report.txt ``` You just created a file without writing any content. Control timestamps precisely Set only access or only modification time, avoid creating files, or copy times from another file: `touch -a file` updates access time, `touch -m file` updates modification time, `touch -c file` does not create, and `touch -r ref file` copies timestamps from `ref`. When touch matters Use `touch` in build systems and scripts to force rebuilds or to mark job completion; watch for permission errors on read-only filesystems, immutable attributes that block changes, and the difference between changing times and creating content when debugging timestamp-based logic. Small gotchas and options On GNU systems `touch -t 202405161200 file` sets a specific timestamp, while `touch -d '2 days ago' file` accepts human-readable dates; remember that some filesystems mount with noatime which affects observed access-time behavior, and that `touch` follows or does not follow symlinks depending on options and implementation. Final note Mastering `touch` saves time and prevents unnecessary editing; practice combining it with checks like `stat` in scripts to make automation robust and predictable; learn more and consider exam preparation at bitsandbytes.academy for CompTIA Linux+ or LPIC-1 certification. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities scripting troubleshooting