Update cheatsheets

This commit is contained in:
ivuorinen
2025-11-15 00:19:52 +00:00
parent 2f0bb2e110
commit cb2b02c321
11 changed files with 240 additions and 6 deletions

29
tldr/asciiquarium Normal file
View File

@@ -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: <https://robobunny.com/projects/asciiquarium/html/?page=2>.
- Start `asciiquarium`:
`asciiquarium`
- Pipe the output through `lolcat` for rainbow colors:
`asciiquarium | lolcat`
- Toggle [p]ause:
`<p>`
- [r]edraw aquarium and all entities:
`<r>`
- Exit `asciiquarium`:
`<q>`

21
tldr/bun-feedback Normal file
View File

@@ -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: <https://bun.com/docs/feedback#use-bun-feedback>.
- 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}}`

12
tldr/bun-x Normal file
View File

@@ -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`

30
tldr/bunx Normal file
View File

@@ -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: <https://bun.sh/docs/pm/bunx>.
- 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}}"`

View File

@@ -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:

View File

@@ -8,18 +8,30 @@ source: https://github.com/tldr-pages/tldr.git
> Inspects, updates and manages submodules.
> More information: <https://git-scm.com/docs/git-submodule>.
- 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}}`

37
tldr/linux/aureport Normal file
View File

@@ -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: <https://manned.org/aureport>.
- 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`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# ceph
> A unified storage system.
> More information: <https://ceph.io/en>.
> More information: <https://docs.ceph.com/en/latest/man/8/ceph/>.
- Check cluster health status:

34
tldr/linux/slabtop Normal file
View File

@@ -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: <https://manned.org/slabtop>.
- 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]}}`

View File

@@ -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: <https://www.freedesktop.org/software/systemd/man/systemctl.html#service-log-level%20SERVICE%20%5BLEVEL%5D>.
- 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}}`

42
tldr/sgdisk Normal file
View File

@@ -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: <https://manned.org/sgdisk>.
- 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]}}`