From 241ab8e29f53879c37858836c7d5da3860b8bb64 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 28 Aug 2025 00:19:36 +0000 Subject: [PATCH] Update cheatsheets --- tldr/dust | 19 ++++++++++--------- tldr/i3-msg | 22 ++++++++++++++++++++++ tldr/linux/cec-client | 34 ++++++++++++++++++++++++++++++++++ tldr/linux/inputattach | 18 ++++++++++++++++++ tldr/linux/st | 23 +++++------------------ tldr/linux/st.1 | 29 +++++++++++++++++++++++++++++ tldr/linux/vgcfgbackup | 29 +++++++++++++++++++++++++++++ tldr/mitmproxy | 8 ++++++++ tldr/safe | 2 +- tldr/st.2 | 33 +++++++++++++++++++++++++++++++++ 10 files changed, 189 insertions(+), 28 deletions(-) create mode 100644 tldr/i3-msg create mode 100644 tldr/linux/cec-client create mode 100644 tldr/linux/inputattach create mode 100644 tldr/linux/st.1 create mode 100644 tldr/linux/vgcfgbackup create mode 100644 tldr/st.2 diff --git a/tldr/dust b/tldr/dust index f387fb9e..2fc95649 100644 --- a/tldr/dust +++ b/tldr/dust @@ -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: . +> Give an instant overview of which directories are using disk space. +> See also: `du`, `ncdu`. +> More information: . - 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]}}` diff --git a/tldr/i3-msg b/tldr/i3-msg new file mode 100644 index 00000000..c3780f3f --- /dev/null +++ b/tldr/i3-msg @@ -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 for available commands. +> More information: . + +- 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` diff --git a/tldr/linux/cec-client b/tldr/linux/cec-client new file mode 100644 index 00000000..bcb91224 --- /dev/null +++ b/tldr/linux/cec-client @@ -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: . + +- 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}}` diff --git a/tldr/linux/inputattach b/tldr/linux/inputattach new file mode 100644 index 00000000..785a0b9d --- /dev/null +++ b/tldr/linux/inputattach @@ -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: . + +- Attach a Pulse8 CEC device to the input system: + +`inputattach --pulse8-cec {{/dev/ttyACM0}}` + +- Display help: + +`inputattach --help` diff --git a/tldr/linux/st b/tldr/linux/st index 238abbf9..2f30ce77 100644 --- a/tldr/linux/st +++ b/tldr/linux/st @@ -5,25 +5,12 @@ source: https://github.com/tldr-pages/tldr.git --- # st -> A simple terminal emulator for the X Window System. -> More information: . +> `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: - -`` - -- Copy/paste from the clipboard: - -`` +`tldr st.2` diff --git a/tldr/linux/st.1 b/tldr/linux/st.1 new file mode 100644 index 00000000..238abbf9 --- /dev/null +++ b/tldr/linux/st.1 @@ -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: . + +- 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: + +`` + +- Copy/paste from the clipboard: + +`` diff --git a/tldr/linux/vgcfgbackup b/tldr/linux/vgcfgbackup new file mode 100644 index 00000000..6770ae26 --- /dev/null +++ b/tldr/linux/vgcfgbackup @@ -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: . + +- 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}}` diff --git a/tldr/mitmproxy b/tldr/mitmproxy index 60980498..fab6c46f 100644 --- a/tldr/mitmproxy +++ b/tldr/mitmproxy @@ -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}}` diff --git a/tldr/safe b/tldr/safe index 9cad5788..1f0eeff2 100644 --- a/tldr/safe +++ b/tldr/safe @@ -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: diff --git a/tldr/st.2 b/tldr/st.2 new file mode 100644 index 00000000..c63d417c --- /dev/null +++ b/tldr/st.2 @@ -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: . + +- 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}}`