Update cheatsheets

This commit is contained in:
ivuorinen
2026-02-13 00:29:55 +00:00
parent 42219ff8ca
commit b4f14e4a22
6 changed files with 19 additions and 15 deletions

View File

@@ -13,14 +13,14 @@ source: https://github.com/tldr-pages/tldr.git
`git difftool --tool-help`
- Set the default diff tool to meld:
- Set the default diff tool to Meld:
`git config --global diff.tool "{{meld}}"`
`git config --global diff.tool "meld"`
- Use the default diff tool to show staged changes:
`git difftool --staged`
- Use a specific tool (opendiff) to show changes since a given commit:
- Use a specific tool to show changes since a given commit:
`git difftool {{[-t|--tool]}} {{opendiff}} {{commit}}`

View File

@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
`git rm {{path/to/file}}`
- Remove directory:
- Remove directory [r]ecursively:
`git rm -r {{path/to/directory}}`

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
`hash -d {{command}}`
- Print the full path of `command`:
- Print the full path of a command:
`hash -t {{command}}`

View File

@@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git
- Reserve a file taking up 700 MiB of disk space:
`fallocate {{[-l|--length]}} {{700M}} {{path/to/file}}`
`fallocate {{[-l|--length]}} 700M {{path/to/file}}`
- Shrink an already allocated file by 200 MiB:
- Shrink an already allocated file by 200 MB:
`fallocate {{[-c|--collapse-range]}} {{[-l|--length]}} {{200M}} {{path/to/file}}`
`fallocate {{[-c|--collapse-range]}} {{[-l|--length]}} 200MB {{path/to/file}}`
- Shrink 20 MB of space after 100 MiB in a file:
`fallocate {{[-c|--collapse-range]}} {{[-o|--offset]}} {{100M}} {{[-l|--length]}} {{20M}} {{path/to/file}}`
`fallocate {{[-c|--collapse-range]}} {{[-o|--offset]}} 100M {{[-l|--length]}} 20M {{path/to/file}}`

View File

@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display reports every 2 seconds for 5 times:
`vmstat {{2}} {{5}}`
`vmstat 2 5`

View File

@@ -10,20 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- Extract pages 1-3, 5, and 6-10 from a PDF file and save them as another one:
`pdftk {{input.pdf}} cat {{1-3 5 6-10}} output {{output.pdf}}`
`pdftk {{path/to/input}}.pdf cat 1-3 5 6-10 output {{path/to/output}}.pdf`
- Merge (concatenate) a list of PDF files and save the result as another one:
`pdftk {{file1.pdf file2.pdf ...}} cat output {{output.pdf}}`
`pdftk {{path/to/file1}}.pdf {{path/to/file2}}.pdf cat output {{path/to/output}}.pdf`
- Split each page of a PDF file into a separate file, with a given filename output pattern:
`pdftk {{input.pdf}} burst output {{out_%d.pdf}}`
`pdftk {{path/to/input}}.pdf burst output {{path/to/out_%d}}.pdf`
- Rotate all pages by 180 degrees clockwise:
`pdftk {{input.pdf}} cat {{1-endsouth}} output {{output.pdf}}`
`pdftk {{path/to/input}}.pdf cat 1-endsouth output {{path/to/output}}.pdf`
- Rotate third page by 90 degrees clockwise and leave others unchanged:
`pdftk {{input.pdf}} cat {{1-2 3east 4-end}} output {{output.pdf}}`
`pdftk {{path/to/input}}.pdf cat 1-2 3east 4-end output {{path/to/output}}.pdf`
- Interleave two PDFs with one-sided scans of a two-sided document, where the backs were scanned back to front:
`pdftk A={{path/to/fronts}}.pdf B={{path/to/backs}}.pdf shuffle A1-end Bend-1 output {{path/to/output}}.pdf`