1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/touch.md
2021-05-14 01:40:50 +01:00

20 lines
508 B
Markdown

# touch
> Change a file access and modification times (atime, mtime).
> More information: <https://www.gnu.org/software/coreutils/touch>.
- Create a new empty file(s) or change the times for existing file(s) to current time:
`touch {{filename}}`
- Set the times on a file to a specific date and time:
`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}`
- Use the times from a file to set the times on a second file:
`touch -r {{filename}} {{filename2}}`
- Create multiple files:
`touch {{file{1,2,3}.txt}}`