Create notes.txt if needed, or update its timestamps.
touch notes.txtCreate an empty file, or update an existing file’s modification time.
touch [OPTION]... FILE...Create notes.txt if needed, or update its timestamps.
touch notes.txtCopy source.txt timestamps to copy.txt.
touch -r source.txt copy.txt| Option / clause | Description |
|---|---|
-a | Change only the access time. |
-m | Change only the modification time. |
-c, --no-create | Do not create a missing file. |
-d, --date=STRING | Use a parsed date/time instead of the current time. |
-r, --reference=FILE | Copy timestamps from another file. |
-t STAMP | Use a timestamp in [[CC]YY]MMDDhhmm[.ss] format. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.