1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 01:37:58 +01:00
tldr/pages/common/touch.md

16 lines
385 B
Markdown
Raw Normal View History

# touch
> Change a file access and modification times (atime, mtime).
- 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:
2015-12-31 14:11:18 +01:00
`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}`
- Use the times from a file to set the times on a second file:
`touch -r {{filename}} {{filename2}}`