Update cheatsheets

This commit is contained in:
ivuorinen
2025-08-28 00:19:36 +00:00
parent 9565d2532c
commit 241ab8e29f
10 changed files with 189 additions and 28 deletions

View File

@@ -5,8 +5,9 @@ source: https://github.com/tldr-pages/tldr.git
---
# dust
> Dust gives an instant overview of which directories are using disk space.
> More information: <https://github.com/bootandy/dust>.
> Give an instant overview of which directories are using disk space.
> See also: `du`, `ncdu`.
> More information: <https://github.com/bootandy/dust#usage>.
- Display information for the current directory:
@@ -18,20 +19,20 @@ source: https://github.com/tldr-pages/tldr.git
- Display 30 directories (defaults to 21):
`dust --number-of-lines 30`
`dust {{[-n|--number-of-lines]}} 30`
- Display information for the current directory, up to 3 levels deep:
`dust --depth 3`
`dust {{[-d|--depth]}} 3`
- Display the biggest directories at the top in descending order:
- Display the largest directories at the top in descending order:
`dust --reverse`
`dust {{[-r|--reverse]}}`
- Ignore all files and directories with a specific name:
- Ignore a file or directory:
`dust --ignore-directory {{file_or_directory_name}}`
`dust {{[-X|--ignore-directory]}} {{path/to/file_or_directory}}`
- Do not display percent bars and percentages:
`dust --no-percent-bars`
`dust {{[-b|--no-percent-bars]}}`

22
tldr/i3-msg Normal file
View File

@@ -0,0 +1,22 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# i3-msg
> Send messages to a running instance of i3 using IPC.
> See <https://i3wm.org/docs/userguide.html#list_of_commands> for available commands.
> More information: <https://manned.org/i3-msg>.
- Run an i3 command:
`i3-msg {{command}}`
- Print a list of workspaces in JSON:
`i3-msg -t get_workspaces`
- Print a layout tree of all open windows, containers, outputs, and workspaces in JSON:
`i3-msg -t get_tree`

34
tldr/linux/cec-client Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# cec-client
> Manage serial bus CEC connections.
> See also: `cec-ctl`.
> More information: <https://manned.org/man/cec-client>.
- List all CEC adapters:
`cec-client {{[-l|--list-devices]}}`
- Start an interactive CEC session:
`sudo cec-client`
- Set the On-Screen Display name:
`sudo cec-client {{[-o|--osd-name]}} {{name}}`
- Send a single command:
`echo {{on 0}} | sudo cec-client {{[-s|--single-command]}}`
- Set a device to standby in interactive mode:
`standby {{0}}`
- Turn a device on in interactive mode:
`on {{0}}`

18
tldr/linux/inputattach Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# inputattach
> Attach a device to the Linux input system.
> The input devices are presented as files in `/dev/input/`.
> More information: <https://manned.org/inputattach>.
- Attach a Pulse8 CEC device to the input system:
`inputattach --pulse8-cec {{/dev/ttyACM0}}`
- Display help:
`inputattach --help`

View File

@@ -5,25 +5,12 @@ source: https://github.com/tldr-pages/tldr.git
---
# st
> A simple terminal emulator for the X Window System.
> More information: <https://manned.org/st>.
> `st` can refer to multiple commands.
- Open a terminal:
- View documentation for the terminal emulator:
`st`
`tldr st.1`
- Open a terminal with a specific title:
- View documentation for the statistics tool:
`st -T {{title}}`
- Open a terminal, execute a given command, and write the output to a file:
`st -o {{path/to/file}} -e {{command argument1 argument2}}`
- Increase/decrease the font size:
`<Ctrl Shift {{PageUp|PageDown}}>`
- Copy/paste from the clipboard:
`<Ctrl Shift {{c|v}}>`
`tldr st.2`

29
tldr/linux/st.1 Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# st
> A simple terminal emulator for the X Window System.
> More information: <https://manned.org/st>.
- Open a terminal:
`st`
- Open a terminal with a specific title:
`st -T {{title}}`
- Open a terminal, execute a given command, and write the output to a file:
`st -o {{path/to/file}} -e {{command argument1 argument2}}`
- Increase/decrease the font size:
`<Ctrl Shift {{PageUp|PageDown}}>`
- Copy/paste from the clipboard:
`<Ctrl Shift {{c|v}}>`

29
tldr/linux/vgcfgbackup Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# vgcfgbackup
> Back up volume group configuration metadata to files (not user data).
> More information: <https://manned.org/vgcfgbackup>.
- Back up metadata for all volume groups (to `/etc/lvm/backup/` by default):
`vgcfgbackup`
- Back up metadata for a specific volume group:
`vgcfgbackup {{vg_name}}`
- Write the backup to a specific file:
`vgcfgbackup {{[-f|--file]}} {{path/to/backup}} {{vg_name}}`
- Back up multiple VGs using a filename template (`%s` becomes the VG name):
`vgcfgbackup {{[-f|--file]}} {{/tmp/vg-backup-%s}} {{vg1 vg2 ...}}`
- Increase verbosity (repeat `-v` for more detail):
`vgcfgbackup {{[-v|--verbose]}} {{vg_name}}`

View File

@@ -32,3 +32,11 @@ source: https://github.com/tldr-pages/tldr.git
- Set the console layout:
`mitmproxy --console-layout {{horizontal|single|vertical}}`
- Save all proxied traffic to a file for later analysis:
`mitmproxy {{[-w|--save-stream-file]}} {{path/to/dump.mitm}}`
- Replay a previously saved HTTP flow file:
`mitmproxy {{[-nr|--no-server --rfile]}} {{path/to/dump.mitm}}`

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Move a secret from one path to another:
`safe move {{old/path/to/secret}} {{new/path/to/secret}}`
`safe move {{path/to/old_secret}} {{path/to/new_secret}}`
- Generate a new 2048-bit SSH key-pair and store it:

33
tldr/st.2 Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# st
> Print basic descriptive statistics from input numbers.
> More information: <https://github.com/nferraz/st>.
- Print count, min, max, sum, mean, and standard deviation for numbers in a file:
`st {{path/to/file}}`
- Print statistics from standard input:
`cat {{path/to/file}} | st`
- Print only the sum of the numbers:
`st {{[-s|--sum]}} {{path/to/file}}`
- Print only the mean of the numbers:
`st {{[-m|--mean]}} {{path/to/file}}`
- Print only the standard deviation:
`st {{[-s|--sd]}} {{path/to/file}}`
- Transpose output (keys in one column, values in another):
`st {{[-t|--transpose]}} {{path/to/file}}`