From cb2b02c321589af44ba03f8d33a66ebb8d98503c Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 15 Nov 2025 00:19:52 +0000 Subject: [PATCH] Update cheatsheets --- tldr/asciiquarium | 29 ++++++++++++++++++ tldr/bun-feedback | 21 +++++++++++++ tldr/bun-x | 12 ++++++++ tldr/bunx | 30 ++++++++++++++++++ tldr/git-bisect | 4 +-- tldr/git-submodule | 18 +++++++++-- tldr/linux/aureport | 37 +++++++++++++++++++++++ tldr/linux/ceph | 2 +- tldr/linux/slabtop | 34 +++++++++++++++++++++ tldr/linux/systemctl-service-log-level | 17 +++++++++++ tldr/sgdisk | 42 ++++++++++++++++++++++++++ 11 files changed, 240 insertions(+), 6 deletions(-) create mode 100644 tldr/asciiquarium create mode 100644 tldr/bun-feedback create mode 100644 tldr/bun-x create mode 100644 tldr/bunx create mode 100644 tldr/linux/aureport create mode 100644 tldr/linux/slabtop create mode 100644 tldr/linux/systemctl-service-log-level create mode 100644 tldr/sgdisk diff --git a/tldr/asciiquarium b/tldr/asciiquarium new file mode 100644 index 00000000..272c941f --- /dev/null +++ b/tldr/asciiquarium @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# asciiquarium + +> Display an animated aquarium in ASCII art inside the terminal. +> More information: . + +- Start `asciiquarium`: + +`asciiquarium` + +- Pipe the output through `lolcat` for rainbow colors: + +`asciiquarium | lolcat` + +- Toggle [p]ause: + +`

` + +- [r]edraw aquarium and all entities: + +`` + +- Exit `asciiquarium`: + +`` diff --git a/tldr/bun-feedback b/tldr/bun-feedback new file mode 100644 index 00000000..7824d6c5 --- /dev/null +++ b/tldr/bun-feedback @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# bun feedback + +> Sends feedback to `Bun`. +> More information: . + +- Send text as feedback: + +`bun feedback "{{Feedback text!}}"` + +- Send one or more files as feedback: + +`bun feedback {{path/to/file1 path/to/file2 ...}}` + +- Send feedback with email address attached: + +`bun feedback {{path/to/file|text}} {{[-e|--email]}} {{email@address}}` diff --git a/tldr/bun-x b/tldr/bun-x new file mode 100644 index 00000000..8e2c53c5 --- /dev/null +++ b/tldr/bun-x @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# bun x + +> This command is an alias of `bunx`. + +- View documentation for the original command: + +`tldr bunx` diff --git a/tldr/bunx b/tldr/bunx new file mode 100644 index 00000000..19a2e6ad --- /dev/null +++ b/tldr/bunx @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# bunx + +> Execute a package binary (installed locally or fetched remotely). +> Note: `bun x` can be used as an alias for `bunx`. +> More information: . + +- Download and execute a package from the registry: + +`bunx {{package_name}} "{{command_argument}}"` + +- Check the version of a locally installed package (if found): + +`bunx {{package_name}} --version` + +- Force an executable to run with the `Bun` runtime (instead of `Node`): + +`bunx --bun {{package_name}}` + +- Execute a binary that has a different name than its package: + +`bunx {{[-p|--package]}} {{package_name}} {{command}}` + +- Download and execute a specific version of a package: + +`bunx {{package_name@version}} "{{command_argument}}"` diff --git a/tldr/git-bisect b/tldr/git-bisect index 7103149c..551c92b3 100644 --- a/tldr/git-bisect +++ b/tldr/git-bisect @@ -29,9 +29,9 @@ source: https://github.com/tldr-pages/tldr.git `git bisect start {{bad_commit}} {{good_commit}} -- {{path/to/file_or_directory}}` -- Automate the bisect process using a test script that `exit`s with 0 for "good" and non-zero for "bad" (script arguments are optional): +- Automate the bisect process using a test script that `exit`s with 0 for "good" and non-zero for "bad": -`git bisect run {{path/to/test_script}} {{script_arguments}}` +`git bisect run {{path/to/test_script}} {{optional_script_arguments}}` - Display a log of what has been done so far: diff --git a/tldr/git-submodule b/tldr/git-submodule index 5838a348..3777a3d8 100644 --- a/tldr/git-submodule +++ b/tldr/git-submodule @@ -8,18 +8,30 @@ source: https://github.com/tldr-pages/tldr.git > Inspects, updates and manages submodules. > More information: . -- Install a repository's specified submodules: +- View existing submodules, and the checked-out commit for each one: + +`git submodule status` + +- Install a repository's submodules (listed in `.gitmodules`): `git submodule update --init --recursive` -- Add a Git repository as a submodule: +- Add a Git repository as a submodule of the current one: `git submodule add {{repository_url}}` -- Add a Git repository as a submodule at the specified directory: +- Add a Git repository as a submodule of the current one, at a specific directory: `git submodule add {{repository_url}} {{path/to/directory}}` - Update every submodule to its latest commit: `git submodule update --init --recursive --remote` + +- Change the URL of a submodule: + +`git submodule set-url {{path/to/submodule}} {{new_url}}` + +- Unregister a submodule (e.g. before removing it from the repository with `git rm`): + +`git submodule deinit {{path/to/submodule}}` diff --git a/tldr/linux/aureport b/tldr/linux/aureport new file mode 100644 index 00000000..2f16bbf6 --- /dev/null +++ b/tldr/linux/aureport @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# aureport + +> Generate summary reports of auditd logs. +> More information: . + +- Display a summary of auditd events: + +`sudo aureport` + +- Generate a summary of login events: + +`sudo aureport {{[-l|--login]}}` + +- List all syscall reports: + +`sudo aureport {{[-s|--syscall]}}` + +- Generate a summary of executable events: + +`sudo aureport {{[-x|--executable]}}` + +- Show a summary of events for a specific time range: + +`sudo aureport {{[-ts|--start]}} {{start_time}} {{[-te|--end]}} {{end_time}}` + +- List all audit files and the time range of events they cover: + +`sudo aureport {{[-t|--log-time]}}` + +- Display help: + +`aureport --help` diff --git a/tldr/linux/ceph b/tldr/linux/ceph index 4285fd1d..0ae1ce3b 100644 --- a/tldr/linux/ceph +++ b/tldr/linux/ceph @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # ceph > A unified storage system. -> More information: . +> More information: . - Check cluster health status: diff --git a/tldr/linux/slabtop b/tldr/linux/slabtop new file mode 100644 index 00000000..63865cef --- /dev/null +++ b/tldr/linux/slabtop @@ -0,0 +1,34 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# slabtop + +> Display kernel slab cache information in real time. +> See also: `top`, `htop`, `atop`. +> More information: . + +- Start `slabtop`: + +`sudo slabtop` + +- Sort by [c]ache size: + +`sudo slabtop {{[-s|--sort]}} c` + +- Sort by number of [o]bjects: + +`sudo slabtop {{[-s|--sort]}} o` + +- Sort by object [s]ize: + +`sudo slabtop {{[-s|--sort]}} s` + +- Display once and then exit: + +`sudo slabtop {{[-o|--once]}}` + +- Display help: + +`slabtop {{[-h|--help]}}` diff --git a/tldr/linux/systemctl-service-log-level b/tldr/linux/systemctl-service-log-level new file mode 100644 index 00000000..45b0a9c3 --- /dev/null +++ b/tldr/linux/systemctl-service-log-level @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl service-log-level + +> Get or set the runtime log level of a service via D-Bus. +> More information: . + +- Show the current log level of a service: + +`systemctl service-log-level {{service_name}}` + +- Set the log level of a service (the level name can be replaced with a number from 0 to 7): + +`systemctl service-log-level {{service_name}} {{emerg|alert|crit|err|warning|notice|info|debug}}` diff --git a/tldr/sgdisk b/tldr/sgdisk new file mode 100644 index 00000000..ae6ea285 --- /dev/null +++ b/tldr/sgdisk @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# sgdisk + +> Manage GUID Partition Tables (GPT). +> Part of the GPT fdisk suite; designed for scripting and automation. +> More information: . + +- Display basic GPT partition summary data for a device: + +`sudo sgdisk {{[-p|--print]}} {{/dev/sdX}}` + +- Wipe both GPT and MBR data structures from a device (destroys all partition information): + +`sudo sgdisk {{[-Z|--zap-all]}} {{/dev/sdX}}` + +- Convert a GPT disk to MBR format using up to four partitions: + +`sudo sgdisk {{[-m|--gpttombr]}} {{1:2:3:4}} {{/dev/sdX}}` + +- Delete a partition entry by number (data in sectors remains untouched): + +`sudo sgdisk {{[-d|--delete]}} {{1}} {{/dev/sdX}}` + +- Save the current in-memory GPT data (protective MBR, headers, and table) to a binary backup file: + +`sudo sgdisk {{[-b|--backup]}} {{/path/to/backup.gpt}} {{/dev/sdX}}` + +- Load GPT data from a backup file (restoring from a non-original disk is not recommended): + +`sudo sgdisk {{[-l|--load-backup]}} {{/path/to/backup.gpt}} {{/dev/sdX}}` + +- Verify GPT structures for CRC errors, mismatches, or inconsistencies: + +`sudo sgdisk {{[-v|--verify]}} {{/dev/sdX}}` + +- Display a summary of available partition type codes (no device required): + +`sgdisk {{[-L|--list-types]}}`