Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-24 00:21:36 +00:00
parent 4e6886aa1f
commit 70f6f2ac08
27 changed files with 174 additions and 69 deletions

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Display keypress information:
`sudo keyd monitor`
`sudo keyd {{[-m|monitor]}}`
- Reset bindings and reload the configuration files in `/etc/keyd`:
@@ -24,6 +24,10 @@ source: https://github.com/tldr-pages/tldr.git
`keyd list-keys`
- Check the detected configuration files for errors:
`keyd check`
- Create a temporary binding:
`sudo keyd bind "{{pressed_key}} = {{output_key}}"`

View File

@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
`lsblk {{[-e|--exclude]}} {{1,7,...}}`
- Display a customized summary using a comma-separated list of columns:
- Add extra information to the output using a comma-separated list of columns (omit the `+` sign to only display the specified columns):
`lsblk {{[-o|--output]}} {{NAME,ROTA,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT,...}}`
`lsblk {{[-o|--output]}} +{{NAME,ROTA,SERIAL,MODEL,TRAN,TYPE,SIZE,FSTYPE,MOUNTPOINT,...}}`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# quickemu
> Build and manage highly optimised desktop virtual machines quickly.
> Note: Virtual machine must be in stopped state when working with snapshots.
> See also: `quickget` for preparing VM configurations.
> More information: <https://github.com/quickemu-project/quickemu>.
@@ -33,6 +34,10 @@ source: https://github.com/tldr-pages/tldr.git
`quickemu --snapshot apply {{tag}} --vm {{path/to/file.conf}}`
- List available snapshots:
`quickemu --snapshot info --vm {{path/to/file.conf}}`
- Delete a snapshot:
`quickemu --snapshot delete {{tag}} --vm {{path/to/file.conf}}`

View File

@@ -9,34 +9,34 @@ source: https://github.com/tldr-pages/tldr.git
> See also: `awk`, `ed`.
> More information: <https://www.gnu.org/software/sed/manual/sed.html>.
- Replace "apple" with "mango" on all lines using basic `regex`, print to `stdout`:
- [s]ubstitute all occurrences of "apple" with "mango" on all lines, print to `stdout`:
`{{command}} | sed 's/apple/mango/g'`
- Replace "apple" with "APPLE" on all lines using extended `regex`, print to `stdout`:
- Replace "apple" with "mango" in-place in a file (overwriting original file):
`{{command}} | sed {{[-E|--regexp-extended]}} 's/(apple)/\U\1/g'`
`sed {{[-i|--in-place]}} 's/apple/mango/g' {{path/to/file}}`
- Use basic `regex` to replace "apple" with "mango" and "orange" with "lime" in-place in a file (overwriting original file):
- Run multiple substitutions in one command:
`sed {{[-i|--in-place]}} -e 's/apple/mango/g' -e 's/orange/lime/g' {{path/to/file}}`
`{{command}} | sed -e '{{s/apple/mango/g}}' -e '{{s/orange/lime/g}}'`
- Execute a specific `sed` script file and print the result to `stdout`:
- Use a custom delimiter (useful when the pattern contains slashes):
`{{command}} | sed {{[-f|--file]}} {{path/to/script.sed}}`
- [p]rint only the first line to `stdout`:
`{{command}} | sed {{[-n|--quiet]}} '1p'`
`{{command}} | sed '{{s#////#____#g}}'`
- [d]elete lines 1 to 5 of a file and back up the original file with a `.orig` extension:
`sed {{[-i|--in-place=]}}{{.orig}} '1,5d' {{path/to/file}}`
- [i]nsert a new line at the beginning of a file, overwriting the original file in-place:
- [p]rint only the first line to `stdout`:
`{{command}} | sed {{[-n|--quiet]}} '1p'`
- [i]nsert a new line at the beginning of a file, overwriting the original file:
`sed {{[-i|--in-place]}} '1i\your new line text\' {{path/to/file}}`
- Delete blank lines (with or without spaces/tabs) from a file, overwriting the original file in-place:
- Delete blank lines (with or without spaces/tabs) from a file, overwriting the original file:
`sed {{[-i|--in-place]}} '/^[[:space:]]*$/d' {{path/to/file}}`

View File

@@ -15,16 +15,16 @@ source: https://github.com/tldr-pages/tldr.git
- Don't cut the description off at the end of the line:
`whatis --long {{command}}`
`whatis {{[-l|--long]}} {{command}}`
- Display descriptions for all commands matching a glob:
`whatis --wildcard {{net*}}`
`whatis {{[-w|--wildcard]}} {{net*}}`
- Search man page descriptions with a `regex`:
`whatis --regex '{{wish[0-9]\.[0-9]}}'`
`whatis {{[-r|--regex]}} '{{wish[0-9]\.[0-9]}}'`
- Display descriptions in a specific language:
`whatis --locale={{en}} {{command}}`
`whatis {{[-L|--locale]}} {{en}} {{command}}`

View File

@@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git
- Print the default web browser:
`xdg-settings get {{default-web-browser}}`
`xdg-settings get default-web-browser`
- Set the default web browser to Firefox:
`xdg-settings set {{default-web-browser}} {{firefox.desktop}}`
`xdg-settings set default-web-browser {{firefox.desktop}}`
- Set the default mail URL scheme handler to Evolution:
`xdg-settings set {{default-url-scheme-handler}} {{mailto}} {{evolution.desktop}}`
`xdg-settings set default-url-scheme-handler mailto {{evolution.desktop}}`
- Set the default PDF document viewer: