touch do?create empty files, or update a file's access/modification times.
▸ Explain your own touch command →$ touch newfile.txt
$ touch -c -m existing.log
| -a | change only the access time |
| -m | change only the modification time |
| -c | don't create the file if it doesn't already exist |
| -r | use this reference file's timestamps instead of now |
| -d | set the time from a human-readable date string |
| -t | set the time from a [[CC]YY]MMDDhhmm[.ss] stamp |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.