mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-09-10 16:13:31 +02:00
touch: add -d example (#7274)
This commit is contained in:
parent
510e695f9f
commit
4f922202b0
1 changed files with 8 additions and 4 deletions
|
@ -5,16 +5,20 @@
|
|||
|
||||
- Create a new empty file(s) or change the times for existing file(s) to current time:
|
||||
|
||||
`touch {{filename}}`
|
||||
`touch {{path/to/file}}`
|
||||
|
||||
- Set the times on a file to a specific date and time:
|
||||
|
||||
`touch -t {{YYYYMMDDHHMM.SS}} {{filename}}`
|
||||
`touch -t {{YYYYMMDDHHMM.SS}} {{path/to/file}}`
|
||||
|
||||
- Set the time on a file to one hour in the past:
|
||||
|
||||
`touch -d "{{-1 hour}}" {{path/to/file}}`
|
||||
|
||||
- Use the times from a file to set the times on a second file:
|
||||
|
||||
`touch -r {{filename}} {{filename2}}`
|
||||
`touch -r {{path/to/file1}} {{path/to/file2}}`
|
||||
|
||||
- Create multiple files:
|
||||
|
||||
`touch {{file{1,2,3}.txt}}`
|
||||
`touch {{path/to/file{1,2,3}.txt}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue