Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-21 00:23:22 +00:00
parent 1ec3810968
commit b8203a5041
39 changed files with 133 additions and 46 deletions

View File

@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
- Download the same file from different mirrors and verify the checksum of the downloaded file:
`aria2c --checksum {{sha-256}}={{hash}} "{{url1}}" "{{url2}}" "{{urlN}}"`
`aria2c --checksum {{sha-256}}={{hash}} {{"url1" "url2" ...}}`
- Download the URIs listed in a file with a specific number of parallel downloads:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Add a dependency and enable one or more specific features:
`cargo add {{dependency}} --features {{feature_1}},{{feature_2}}`
`cargo add {{dependency}} {{[-F|--features]}} {{feature_1}},{{feature_2}}`
- Add an optional dependency, which then gets exposed as a feature of the crate:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Remove release artifacts (the `target/release` directory):
`cargo clean --release`
`cargo clean {{[-r|--release]}}`
- Remove artifacts in the directory of the given profile (in this case, `target/debug`):

View File

@@ -26,15 +26,15 @@ source: https://github.com/tldr-pages/tldr.git
- Run checks for a lint group (see <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>):
`cargo clippy -- --warn clippy::{{lint_group}}`
`cargo clippy -- {{[-W|--warn]}} clippy::{{lint_group}}`
- Treat warnings as errors:
`cargo clippy -- --deny warnings`
`cargo clippy -- {{[-D|--deny]}} warnings`
- Run checks and ignore warnings:
`cargo clippy -- --allow warnings`
`cargo clippy -- {{[-A|--allow]}} warnings`
- Apply Clippy suggestions automatically:

View File

@@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git
- Invite the given user or team as an owner:
`cargo owner --add {{username|github:org_name:team_name}} {{crate}}`
`cargo owner {{[-a|--add]}} {{username|github:org_name:team_name}} {{crate}}`
- Remove the given user or team as an owner:
`cargo owner --remove {{username|github:org_name:team_name}} {{crate}}`
`cargo owner {{[-r|--remove]}} {{username|github:org_name:team_name}} {{crate}}`
- List owners of a crate:
`cargo owner --list {{crate}}`
`cargo owner {{[-l|--list]}} {{crate}}`
- Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>):

View File

@@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display what files would be included in the tarball without actually creating it:
`cargo package --list`
`cargo package {{[-l|--list]}}`

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Perform checks, create a `.crate` file but don't upload it (equivalent of `cargo package`):
`cargo publish --dry-run`
`cargo publish {{[-n|--dry-run]}}`
- Use the specified registry (registry names can be defined in the configuration - the default is <https://crates.io>):

View File

@@ -8,14 +8,14 @@ source: https://github.com/tldr-pages/tldr.git
> Display various kinds of reports.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-report.html>.
- Display a report:
- Display a report of crates which will eventually stop compiling:
`cargo report {{future-incompatibilities|...}}`
`cargo report future-incompatibilities`
- Display a report with the specified Cargo-generated ID:
`cargo report {{future-incompatibilities|...}} --id {{id}}`
`cargo report future-incompatibilities --id {{id}}`
- Display a report for the specified package:
`cargo report {{future-incompatibilities|...}} --package {{package}}`
`cargo report future-incompatibilities {{[-p|--package]}} {{package}}`

View File

@@ -27,4 +27,4 @@ source: https://github.com/tldr-pages/tldr.git
- Only show normal/build/development dependencies:
`cargo tree --edges {{normal|build|dev}}`
`cargo tree {{[-e|--edges]}} {{normal|build|dev}}`

View File

@@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git
---
# cargo uninstall
> Remove a Rust binary installed using `cargo install`.
> Remove a Rust binary installed globally using `cargo install`.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-uninstall.html>.
- Remove an installed binary:
`cargo remove {{package_spec}}`
`cargo uninstall {{package_spec}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Display what would be updated, but don't actually write the lockfile:
`cargo update --dry-run`
`cargo update {{[-n|--dry-run]}}`
- Update only the specified dependencies:

View File

@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display additional build information:
`cargo version --verbose`
`cargo version {{[-v|--verbose]}}`

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Attach to a running process and begin debugging:
`div attach {{pid}}`
`dlv attach {{pid}}`
- Compile and begin tracing a program:

View File

@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Lint using the specified configuration file:
`eslint {{[-c|--config]}} {{path/to/config_file}} {{path/to/file1.js path/to/file2.js}}`
`eslint {{[-c|--config]}} {{path/to/config_file}} {{path/to/file1.js path/to/file2.js ...}}`

View File

@@ -16,6 +16,10 @@ source: https://github.com/tldr-pages/tldr.git
`func_name`
- Define a function without the `function` keyword:
`{{func_name}}() { {{echo "Function contents here"}}; }`
- Display help:
`help function`

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Launch a Git daemon with a whitelisted set of directories:
`git daemon --export-all {{path/to/directory1}} {{path/to/directory2}}`
`git daemon --export-all {{path/to/directory1 path/to/directory2 ...}}`
- Launch a Git daemon with a specific base directory and allow pulling from all sub-directories that look like Git repositories:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- List available container plugins:
`gst-inspect-10 {{matroska|avi|ogg|isomp4}}`
`gst-inspect-1.0 {{matroska|avi|ogg|isomp4}}`
- List available audio codecs:

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Run all given test files:
`hardhat test {{path/to/file1.js}} {{path/to/file2.js}}`
`hardhat test {{path/to/file1.js path/to/file2.js ...}}`
- Start a local Ethereum JSON-RPC node for development:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Search multiple directories:
`jdupes {{directory1}} {{directory2}}`
`jdupes {{directory1 directory2 ...}}`
- Search all directories recursively:

25
tldr/kdash Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kdash
> A simple terminal dashboard for Kubernetes.
> Mode information: <https://github.com/kdash-rs/kdash/#usage>.
- Show dashboard:
`kdash`
- Show dashboard in debug mode and write logs to a file in the current directory:
`kdash {{[-d|--debug]}}`
- Set the tick rate:
`kdash {{[-t|--tick-rate]}} {{100}}`
- Set the polling rate (must be a multiple of the tick rate):
`kdash {{[-t|--tick-rate]}} {{200}} {{[-p|--poll-rate]}} {{400}}`

29
tldr/kerl Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kerl
> Build and install Erlang/OTP instances with ease.
> More information: <https://github.com/kerl/kerl>.
- Build and install an Erlang/OTP version in a directory:
`kerl build-install {{28.0}} {{28.0}} {{path/to/installation_directory}}/{{28.0}}`
- Activate an Erlang/OTP installation:
`. {{path/to/installation}}/activate`
- Deactivate the current Erlang/OTP installation:
`kerl_deactivate`
- List all available Erlang/OTP releases:
`kerl list releases`
- List installed Erlang/OTP builds:
`kerl list installations`

25
tldr/kubectl-auth Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kubectl auth
> Inspect access permissions in a Kubernetes cluster.
> More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#auth>.
- Check if the current user can perform all actions on all resources in a specific namespace:
`kubectl auth can-i '*' '*' {{[-n|--namespace]}} {{namespace}}`
- Check if the current user can perform a specific verb on a specific resource:
`kubectl auth can-i {{verb}} {{resource}} {{[-n|--namespace]}} {{namespace}}`
- Check if a specific user or service account can perform an action on a resource:
`kubectl auth can-i {{verb}} {{resource}} {{[-n|--namespace]}} {{namespace}} --as {{user_or_sa}}`
- List all actions the current user is allowed to perform in a namespace:
`kubectl auth can-i --list {{[-n|--namespace]}} {{namespace}}`

View File

@@ -31,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git
- Duplicate a quota to other users:
`sudo edquota {{[-p|--prototype]}} {{reference_user}} {{destination_user1}} {{destination_user2}}`
`sudo edquota {{[-p|--prototype]}} {{reference_user}} {{destination_user1 destination_user2 ...}}`

View File

@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
- Install one or more packages from files:
`sudo pacman -U {{path/to/package1.pkg.tar.zst}} {{path/to/package2.pkg.tar.zst}}`
`sudo pacman -U {{path/to/package1.pkg.tar.zst path/to/package2.pkg.tar.zst ...}}`
- Install a package without prompting:

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Create an archive:
`patool create {{/path/to/archive}} {{/path/to/file1}} {{/path/to/file2}} {{/path/to/dir1/}} {{/path/to/dir2/}}`
`patool create {{path/to/archive}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
- List contents of an archive:

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Unmount one or more devices:
`systemd-mount {{[-u|--umount]}} {{path/to/mount_point_or_device1}} {{path/to/mount_point_or_device2}}`
`systemd-mount {{[-u|--umount]}} {{path/to/mount_point_or_device1 path/to/mount_point_or_device2 ...}}`
- Mount a file system (image or block device) with a specific file system type:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Send an email with files attached:
`mutt -a {{file1}} {{file2}} -- {{recipient@example.com}}`
`mutt -a {{file1 file2 ...}} -- {{recipient@example.com}}`
- Specify a file to include as the message body:

View File

@@ -24,6 +24,10 @@ source: https://github.com/tldr-pages/tldr.git
`objdump {{[-M|--disassembler-options]}} intel {{[-d|--disassemble]}} {{path/to/binary}}`
- Display the symbol table:
`objdump {{[-t|--syms]}} {{path/to/binary}}`
- Display a complete binary hex dump of all sections:
`objdump {{[-s|--full-contents]}} {{path/to/binary}}`

View File

@@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git
- Compile a source file to a native binary and link with packages:
`ocamlfind ocamlopt -package {{package1}},{{package2}} -linkpkg -o {{path/to/executable}} {{path/to/source.ml}}`
`ocamlfind ocamlopt -package {{package1,package2,...}} -linkpkg -o {{path/to/executable}} {{path/to/source.ml}}`
- Compile a source file to a bytecode binary and link with packages:
`ocamlfind ocamlc -package {{package1}},{{package2}} -linkpkg -o {{path/to/executable}} {{path/to/source.ml}}`
`ocamlfind ocamlc -package {{package1,package2,...}} -linkpkg -o {{path/to/executable}} {{path/to/source.ml}}`
- Cross-compile for a different platform:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Open a set of files:
`picard {{path/to/file1.mp3}} {{path/to/file2.mp3}}`
`picard {{path/to/file1.mp3 path/to/file2.mp3 ...}}`
- Display the version of Picard installed:

View File

@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
- Blend the specified PPM images using fadefactor to control the weight of each image:
`ppmmix {{fadefactor}} {{path/to/input_file1.ppm}} {{path/to/input_file2.ppm}} > {{path/to/output_file.ppm}}`
`ppmmix {{fadefactor}} {{path/to/input_file1.ppm path/to/input_file2.ppm ...}} > {{path/to/output_file.ppm}}`

View File

@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
- List the supported machine types:
`qemu-system-x86_64 {{[-M|-machine]}} help`
`qemu-system-i386 {{[-M|-machine]}} help`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Do not launch a VNC server:
`qemu-system-i386 -hda {{image_name.img}} -m {{4096}} -nographic`
`qemu-system-x86_64 -hda {{image_name.img}} -m {{4096}} -nographic`
- Exit non-graphical QEMU:

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- Add files to a changelist, creating the changelist if it does not exist:
`svn changelist {{changelist_name}} {{path/to/file1}} {{path/to/file2}}`
`svn changelist {{changelist_name}} {{path/to/file1 path/to/file2 ...}}`
- Remove files from a changelist:
`svn changelist --remove {{path/to/file1}} {{path/to/file2}}`
`svn changelist --remove {{path/to/file1 path/to/file2 ...}}`
- Remove the whole changelist at once:

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Remove multiple dependencies:
`uv remove {{package1}} {{package2}}`
`uv remove {{package1 package2 ...}}`
- Remove a development dependency:

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Convert multiple files to `bgm_(original name).wav` (Default `-o` pattern is `?f.wav`):
`vgmstream_cli -o {{path/to/bgm_?f.wav}} {{path/to/file1.adc}} {{path/to/file2.adc}}`
`vgmstream_cli -o {{path/to/bgm_?f.wav}} {{path/to/file1.adc path/to/file2.adc ...}}`
- Play the file looping endlessly (`channels` and `rate` must match metadata):

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- Log in to an Azure Tenant:
`azopy login`
`azcopy login`
- Upload a local file:

View File

@@ -18,15 +18,15 @@ source: https://github.com/tldr-pages/tldr.git
- While in a `yacas` session, display an example:
`{{Example()}};`
`Example();`
- Quit from a `yacas` session:
`{{quit}}`
`quit`
- Execute one or more `yacas` scripts (without terminal or prompts), then exit:
`yacas -p -c {{path/to/script1}} {{path/to/script2}}`
`yacas -p -c {{path/to/script1 path/to/script2 ...}}`
- Execute and print the result of one statement, then exit:

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Analyze live traffic from a network interface and load custom scripts:
`sudo zeek --iface {{interface}} {{script1}} {{script2}}`
`sudo zeek --iface {{interface}} {{script1 script2 ...}}`
- Analyze live traffic from a network interface, without loading any scripts: