From b8203a504145cee9380d400bad4a294776380cf6 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Mon, 21 Jul 2025 00:23:22 +0000 Subject: [PATCH] Update cheatsheets --- tldr/aria2c | 2 +- tldr/cargo-add | 2 +- tldr/cargo-clean | 2 +- tldr/cargo-clippy | 6 +++--- tldr/cargo-owner | 6 +++--- tldr/cargo-package | 2 +- tldr/cargo-publish | 2 +- tldr/cargo-report | 8 ++++---- tldr/cargo-tree | 2 +- tldr/cargo-uninstall | 4 ++-- tldr/cargo-update | 2 +- tldr/cargo-version | 2 +- tldr/dlv | 2 +- tldr/eslint | 2 +- tldr/function | 4 ++++ tldr/git-daemon | 2 +- tldr/gst-inspect-1.0 | 2 +- tldr/hardhat | 2 +- tldr/jdupes | 2 +- tldr/kdash | 25 +++++++++++++++++++++++++ tldr/kerl | 29 +++++++++++++++++++++++++++++ tldr/kubectl-auth | 25 +++++++++++++++++++++++++ tldr/linux/edquota | 2 +- tldr/linux/pacman-upgrade | 2 +- tldr/linux/patool | 2 +- tldr/linux/systemd-mount | 2 +- tldr/mutt | 2 +- tldr/objdump | 4 ++++ tldr/ocamlfind | 4 ++-- tldr/picard | 2 +- tldr/ppmmix | 2 +- tldr/qemu-system-i386 | 2 +- tldr/qemu-system-x86_64 | 2 +- tldr/svn-changelist | 4 ++-- tldr/uv-remove | 2 +- tldr/vgmstream_cli | 2 +- tldr/windows/azcopy | 2 +- tldr/yacas | 6 +++--- tldr/zeek | 2 +- 39 files changed, 133 insertions(+), 46 deletions(-) create mode 100644 tldr/kdash create mode 100644 tldr/kerl create mode 100644 tldr/kubectl-auth diff --git a/tldr/aria2c b/tldr/aria2c index ae88fd41..ff01eba2 100644 --- a/tldr/aria2c +++ b/tldr/aria2c @@ -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: diff --git a/tldr/cargo-add b/tldr/cargo-add index 27f51724..28dc7181 100644 --- a/tldr/cargo-add +++ b/tldr/cargo-add @@ -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: diff --git a/tldr/cargo-clean b/tldr/cargo-clean index 8b732bd4..21566099 100644 --- a/tldr/cargo-clean +++ b/tldr/cargo-clean @@ -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`): diff --git a/tldr/cargo-clippy b/tldr/cargo-clippy index 19f42b97..92c1fca5 100644 --- a/tldr/cargo-clippy +++ b/tldr/cargo-clippy @@ -26,15 +26,15 @@ source: https://github.com/tldr-pages/tldr.git - Run checks for a lint group (see ): -`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: diff --git a/tldr/cargo-owner b/tldr/cargo-owner index 38dec540..3257972b 100644 --- a/tldr/cargo-owner +++ b/tldr/cargo-owner @@ -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 ): diff --git a/tldr/cargo-package b/tldr/cargo-package index 6f0eb303..89cece1d 100644 --- a/tldr/cargo-package +++ b/tldr/cargo-package @@ -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]}}` diff --git a/tldr/cargo-publish b/tldr/cargo-publish index c201d315..75a57ecf 100644 --- a/tldr/cargo-publish +++ b/tldr/cargo-publish @@ -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 ): diff --git a/tldr/cargo-report b/tldr/cargo-report index 75d68898..2f45d7fd 100644 --- a/tldr/cargo-report +++ b/tldr/cargo-report @@ -8,14 +8,14 @@ source: https://github.com/tldr-pages/tldr.git > Display various kinds of reports. > More information: . -- 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}}` diff --git a/tldr/cargo-tree b/tldr/cargo-tree index f193c741..b42daddd 100644 --- a/tldr/cargo-tree +++ b/tldr/cargo-tree @@ -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}}` diff --git a/tldr/cargo-uninstall b/tldr/cargo-uninstall index 6f5605de..a0f4ee50 100644 --- a/tldr/cargo-uninstall +++ b/tldr/cargo-uninstall @@ -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: . - Remove an installed binary: -`cargo remove {{package_spec}}` +`cargo uninstall {{package_spec}}` diff --git a/tldr/cargo-update b/tldr/cargo-update index c20c855c..f123c46d 100644 --- a/tldr/cargo-update +++ b/tldr/cargo-update @@ -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: diff --git a/tldr/cargo-version b/tldr/cargo-version index a6f7a239..4e0bea07 100644 --- a/tldr/cargo-version +++ b/tldr/cargo-version @@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git - Display additional build information: -`cargo version --verbose` +`cargo version {{[-v|--verbose]}}` diff --git a/tldr/dlv b/tldr/dlv index c06365d9..2735321b 100644 --- a/tldr/dlv +++ b/tldr/dlv @@ -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: diff --git a/tldr/eslint b/tldr/eslint index 90650bc8..288a0ab9 100644 --- a/tldr/eslint +++ b/tldr/eslint @@ -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 ...}}` diff --git a/tldr/function b/tldr/function index a9e34ada..8b1b8bf7 100644 --- a/tldr/function +++ b/tldr/function @@ -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` diff --git a/tldr/git-daemon b/tldr/git-daemon index 1f4955ac..b7832bc7 100644 --- a/tldr/git-daemon +++ b/tldr/git-daemon @@ -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: diff --git a/tldr/gst-inspect-1.0 b/tldr/gst-inspect-1.0 index 6ecc7270..dbe19933 100644 --- a/tldr/gst-inspect-1.0 +++ b/tldr/gst-inspect-1.0 @@ -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: diff --git a/tldr/hardhat b/tldr/hardhat index 3000dceb..c2aaa024 100644 --- a/tldr/hardhat +++ b/tldr/hardhat @@ -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: diff --git a/tldr/jdupes b/tldr/jdupes index 2922a55d..c77301f2 100644 --- a/tldr/jdupes +++ b/tldr/jdupes @@ -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: diff --git a/tldr/kdash b/tldr/kdash new file mode 100644 index 00000000..5eb96695 --- /dev/null +++ b/tldr/kdash @@ -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: . + +- 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}}` diff --git a/tldr/kerl b/tldr/kerl new file mode 100644 index 00000000..93b0020c --- /dev/null +++ b/tldr/kerl @@ -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: . + +- 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` diff --git a/tldr/kubectl-auth b/tldr/kubectl-auth new file mode 100644 index 00000000..7fe0b65a --- /dev/null +++ b/tldr/kubectl-auth @@ -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: . + +- 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}}` diff --git a/tldr/linux/edquota b/tldr/linux/edquota index bfdc6a08..6098e362 100644 --- a/tldr/linux/edquota +++ b/tldr/linux/edquota @@ -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 ...}}` diff --git a/tldr/linux/pacman-upgrade b/tldr/linux/pacman-upgrade index a2063291..ad5f5b23 100644 --- a/tldr/linux/pacman-upgrade +++ b/tldr/linux/pacman-upgrade @@ -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: diff --git a/tldr/linux/patool b/tldr/linux/patool index 23b1aaaa..48e0cd6d 100644 --- a/tldr/linux/patool +++ b/tldr/linux/patool @@ -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: diff --git a/tldr/linux/systemd-mount b/tldr/linux/systemd-mount index 0988dffb..fd0e4988 100644 --- a/tldr/linux/systemd-mount +++ b/tldr/linux/systemd-mount @@ -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: diff --git a/tldr/mutt b/tldr/mutt index c5bedf4d..381a0bc8 100644 --- a/tldr/mutt +++ b/tldr/mutt @@ -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: diff --git a/tldr/objdump b/tldr/objdump index b5d954be..e8849c6b 100644 --- a/tldr/objdump +++ b/tldr/objdump @@ -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}}` diff --git a/tldr/ocamlfind b/tldr/ocamlfind index 93718de9..4a328b4b 100644 --- a/tldr/ocamlfind +++ b/tldr/ocamlfind @@ -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: diff --git a/tldr/picard b/tldr/picard index bb9517bb..cb685b3c 100644 --- a/tldr/picard +++ b/tldr/picard @@ -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: diff --git a/tldr/ppmmix b/tldr/ppmmix index c08bb626..a8947410 100644 --- a/tldr/ppmmix +++ b/tldr/ppmmix @@ -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}}` diff --git a/tldr/qemu-system-i386 b/tldr/qemu-system-i386 index a92e45a0..238cb573 100644 --- a/tldr/qemu-system-i386 +++ b/tldr/qemu-system-i386 @@ -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` diff --git a/tldr/qemu-system-x86_64 b/tldr/qemu-system-x86_64 index 413f6c6f..34ac4c0e 100644 --- a/tldr/qemu-system-x86_64 +++ b/tldr/qemu-system-x86_64 @@ -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: diff --git a/tldr/svn-changelist b/tldr/svn-changelist index c87fd282..9e8f36a4 100644 --- a/tldr/svn-changelist +++ b/tldr/svn-changelist @@ -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: diff --git a/tldr/uv-remove b/tldr/uv-remove index ab814e9c..866d6d1e 100644 --- a/tldr/uv-remove +++ b/tldr/uv-remove @@ -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: diff --git a/tldr/vgmstream_cli b/tldr/vgmstream_cli index c30c0f6b..293fe470 100644 --- a/tldr/vgmstream_cli +++ b/tldr/vgmstream_cli @@ -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): diff --git a/tldr/windows/azcopy b/tldr/windows/azcopy index d338a441..ea101e7b 100644 --- a/tldr/windows/azcopy +++ b/tldr/windows/azcopy @@ -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: diff --git a/tldr/yacas b/tldr/yacas index 095fbc63..38c89e3e 100644 --- a/tldr/yacas +++ b/tldr/yacas @@ -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: diff --git a/tldr/zeek b/tldr/zeek index b4e2f5bd..519ccc95 100644 --- a/tldr/zeek +++ b/tldr/zeek @@ -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: