Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

25
touch Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# touch
> Create files and set access/modification times.
> More information: <https://manned.org/man/freebsd-13.1/touch>.
- Create specific files:
`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:
`touch -c -{{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:
`touch -c -t {{YYYYMMDDHHMM.SS}} {{path/to/file1 path/to/file2 ...}}`
- Set the file time of a specific file to the time of anothe[r] file and don't [c]reate file if it doesn't exist:
`touch -c -r {{~/.emacs}} {{path/to/file1 path/to/file2 ...}}`