mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-11 18:58:45 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/touch
12
tldr/touch
@@ -12,14 +12,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`touch {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Set the file [a]ccess or [m]odification times to the current one and don't [c]reate file if it doesn't exist:
|
||||
- Set the file [a]ccess or [m]odification times to the current one and don't create file if it doesn't exist:
|
||||
|
||||
`touch -c -{{a|m}} {{path/to/file1 path/to/file2 ...}}`
|
||||
`touch {{[-c|--no-create]}} -{{a|m}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Set the file [t]ime to a specific value and don't [c]reate file if it doesn't exist:
|
||||
- Set the file [t]ime to a specific value and don't create file if it doesn't exist:
|
||||
|
||||
`touch -c -t {{YYYYMMDDHHMM.SS}} {{path/to/file1 path/to/file2 ...}}`
|
||||
`touch {{[-c|--no-create]}} -t {{YYYYMMDDHHMM.SS}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Set the files' timestamp to the [r]eference file's timestamp, and do not [c]reate the file if it does not exist:
|
||||
- Set the files' timestamp to the reference file's timestamp, and do not create the file if it does not exist:
|
||||
|
||||
`touch -c -r {{path/to/reference_file}} {{path/to/file1 path/to/file2 ...}}`
|
||||
`touch {{[-c|--no-create]}} {{[-r|--reference]}} {{path/to/reference_file}} {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
Reference in New Issue
Block a user