From b4f14e4a2290b800038e016e6c6675eb8ff1e52d Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 13 Feb 2026 00:29:55 +0000 Subject: [PATCH] Update cheatsheets --- tldr/git-difftool | 6 +++--- tldr/git-rm | 2 +- tldr/hash | 2 +- tldr/linux/fallocate | 8 ++++---- tldr/linux/vmstat | 2 +- tldr/pdftk | 14 +++++++++----- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/tldr/git-difftool b/tldr/git-difftool index 1a10fc4c..90d6e4b0 100644 --- a/tldr/git-difftool +++ b/tldr/git-difftool @@ -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}}` diff --git a/tldr/git-rm b/tldr/git-rm index 38d3be19..87cedeea 100644 --- a/tldr/git-rm +++ b/tldr/git-rm @@ -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}}` diff --git a/tldr/hash b/tldr/hash index 0b75c0d6..d1f75320 100644 --- a/tldr/hash +++ b/tldr/hash @@ -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}}` diff --git a/tldr/linux/fallocate b/tldr/linux/fallocate index f76e2873..811d7b61 100644 --- a/tldr/linux/fallocate +++ b/tldr/linux/fallocate @@ -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}}` diff --git a/tldr/linux/vmstat b/tldr/linux/vmstat index 387aa342..d3c28ad0 100644 --- a/tldr/linux/vmstat +++ b/tldr/linux/vmstat @@ -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` diff --git a/tldr/pdftk b/tldr/pdftk index 1ceab2b7..66c8ca01 100644 --- a/tldr/pdftk +++ b/tldr/pdftk @@ -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`