tldr/pages/common/touch.md

17 lines
410 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 those specified:
2015-12-31 13:11:18 +00:00
`touch -t 201412250801.59 {{filename}}`
`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}`
- Set the times on a file to match those on second file:
`touch -r {{filename2}} {{filename}}`