From 0c1613a18e738ba56775feb34489fe95c4aada07 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Mon, 4 Aug 2025 00:24:03 +0000 Subject: [PATCH] Update cheatsheets --- tldr/chainctl | 2 +- tldr/jbang | 2 +- tldr/linux/f5fpc | 2 +- tldr/linux/numlockx | 2 +- tldr/linux/partclone | 21 +++++++++++++++++++++ tldr/p4 | 2 +- tldr/whence | 29 +++++++++++++++++++++++++++++ 7 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 tldr/linux/partclone create mode 100644 tldr/whence diff --git a/tldr/chainctl b/tldr/chainctl index 38af01f5..2c29b42e 100644 --- a/tldr/chainctl +++ b/tldr/chainctl @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # chainctl > The official CLI for Chainguard. -> More information: . +> More information: . - Authenticate to the Chainguard Platform: diff --git a/tldr/jbang b/tldr/jbang index 62a2ea82..a28108ff 100644 --- a/tldr/jbang +++ b/tldr/jbang @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Easily create, edit and run self-contained source-only Java programs. > See also: `java`. -> More information: . +> More information: . - Initialize a simple Java class: diff --git a/tldr/linux/f5fpc b/tldr/linux/f5fpc index 9114a514..79eb4ffb 100644 --- a/tldr/linux/f5fpc +++ b/tldr/linux/f5fpc @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # f5fpc > A proprietary commercial SSL VPN client by BIG-IP Edge. -> More information: . +> More information: . - Open a new VPN connection: diff --git a/tldr/linux/numlockx b/tldr/linux/numlockx index bb5b734f..7a46cf72 100644 --- a/tldr/linux/numlockx +++ b/tldr/linux/numlockx @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # numlockx > Control the number lock key status in X11 sessions. -> More information: . +> More information: . - Show the current number lock status: diff --git a/tldr/linux/partclone b/tldr/linux/partclone new file mode 100644 index 00000000..19082e02 --- /dev/null +++ b/tldr/linux/partclone @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# partclone + +> Copy and restore partitions to and from an image while disregarding empty blocks. +> More information: . + +- Copy a partition into an image: + +`sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{/dev/sdXY}} {{[-o|--output]}} {{path/to/backup.img}}` + +- Restore a partition from an image: + +`sudo partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-c|--clone]}} {{[-s|--source]}} {{path/to/backup.img}} {{[-o|--output]}} {{/dev/sdXY}}` + +- Display help: + +`partclone.{{ext4|btrfs|fat32|xfs|...}} {{[-h|--help]}}` diff --git a/tldr/p4 b/tldr/p4 index 25a7e307..d464c41a 100644 --- a/tldr/p4 +++ b/tldr/p4 @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # p4 > Perforce Version Control System. -> More information: . +> More information: . - Log in to the Perforce service: diff --git a/tldr/whence b/tldr/whence new file mode 100644 index 00000000..9f8b3058 --- /dev/null +++ b/tldr/whence @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# whence + +> A Zsh builtin to indicate how a command would be interpreted. +> More information: . + +- Interpret `command`, with expansion if defined as an `alias` (similar to the `command -v` builtin): + +`whence "{{command}}"` + +- Display type of `command`, with location if defined as a function, or binary (equivalent to the `type` and `command -V` builtins): + +`whence -v "{{command}}"` + +- Same as above, except display content of shell functions instead of location (equivalent to `which` builtin): + +`whence -c "{{command}}"` + +- Same as above, but show all occurrences on command path (equivalent to the `where` builtin): + +`whence -ca "{{command}}"` + +- Search only the `PATH` for `command`, ignoring builtins, aliases or shell functions (equivalent to the `where` command): + +`whence -p "{{command}}"`