From 0cc7cfe867db120811b0c73310c852f8aa31e84c Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 22 Oct 2025 00:20:27 +0000 Subject: [PATCH] Update cheatsheets --- tldr/adb-shell-pm | 41 ++++++++++++++++++++++++++++++++++++ tldr/adb-shell-pm-list | 37 ++++++++++++++++++++++++++++++++ tldr/atool | 2 +- tldr/docker-update | 4 ++-- tldr/elasticsearch-keystore | 2 +- tldr/kubectl-cluster-info | 2 +- tldr/kubectl-proxy | 2 +- tldr/linux/aa-decode | 2 +- tldr/linux/dnf-reposync | 2 +- tldr/linux/grub-mount | 2 +- tldr/linux/ip-stats | 41 ++++++++++++++++++++++++++++++++++++ tldr/linux/oma | 41 ++++++++++++++++++++++++++++++++++++ tldr/linux/patool | 2 +- tldr/llvm-mc | 4 ++-- tldr/multipass | 2 +- tldr/osx/rargs | Bin 864 -> 857 bytes tldr/pinta | 2 +- tldr/pkl | 2 +- tldr/poetry-config | 2 +- tldr/poetry-sync | 2 +- tldr/python-m-json.tool | 2 +- tldr/socat | 2 +- tldr/st.2 | 2 +- 23 files changed, 180 insertions(+), 20 deletions(-) create mode 100644 tldr/adb-shell-pm create mode 100644 tldr/adb-shell-pm-list create mode 100644 tldr/linux/ip-stats create mode 100644 tldr/linux/oma diff --git a/tldr/adb-shell-pm b/tldr/adb-shell-pm new file mode 100644 index 00000000..ced93af2 --- /dev/null +++ b/tldr/adb-shell-pm @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# adb shell pm + +> Android Package Manager tool. +> More information: . + +- Print the path to the APK of a package: + +`adb shell pm path {{package}}` + +- Install an app package from a given path: + +`adb shell pm install /{{path/to/app.apk}}` + +- Uninstall a package from the device: + +`adb shell pm uninstall {{package}}` + +- Clear all app data for a package: + +`adb shell pm clear {{package}}` + +- Enable a package or component: + +`adb shell pm enable {{package_or_class}}` + +- Disable a package or component: + +`adb shell pm disable {{package_or_class}}` + +- Grant a permission for an app: + +`adb shell pm grant {{package}} {{android.permission.CAMERA|android.permission.ACCESS_FINE_LOCATION|android.permission.READ_CONTACTS|...}}` + +- Revoke a permission for an app: + +`adb shell pm revoke {{package}} {{android.permission.CAMERA|android.permission.ACCESS_FINE_LOCATION|android.permission.READ_CONTACTS|...}}` diff --git a/tldr/adb-shell-pm-list b/tldr/adb-shell-pm-list new file mode 100644 index 00000000..3a8c6fed --- /dev/null +++ b/tldr/adb-shell-pm-list @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# adb shell pm list + +> List users, packages, permissions, instrumentation, permission groups, features and libraries managed by the package manager. +> More information: . + +- List all installed packages: + +`adb shell pm list packages` + +- Print all users on the system: + +`adb shell pm list users` + +- Print all known permission groups: + +`adb shell pm list permission-groups` + +- Print all known permissions: + +`adb shell pm list permissions` + +- List all test packages: + +`adb shell pm list instrumentation` + +- Print all features of the system: + +`adb shell pm list features` + +- Print all the libraries supported by the current device: + +`adb shell pm list libraries` diff --git a/tldr/atool b/tldr/atool index 2c3c4093..23cab1d5 100644 --- a/tldr/atool +++ b/tldr/atool @@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git `atool {{[-X|--extract-to]}} {{path/to/output_directory}} {{archive.rar}}` -- Display a specific file's content from an archive to standard output (like `cat`): +- Display a specific file's content from an archive to `stdout` (like `cat`): `atool {{[-c|--cat]}} {{archive.tar}} {{path/to/file_in_archive.txt}}` diff --git a/tldr/docker-update b/tldr/docker-update index c6f16eb3..077b7206 100644 --- a/tldr/docker-update +++ b/tldr/docker-update @@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git - Update restart policy to apply when a specific container exits: -`docker update --restart={{always|no|on-failure|unless-stopped}} {{container_name}}` +`docker update --restart {{always|no|on-failure|unless-stopped}} {{container_name}}` - Update the policy to restart up to three times a specific container when it exits with non-zero exit status: -`docker update --restart=on-failure:3 {{container_name}}` +`docker update --restart on-failure:3 {{container_name}}` - Update the number of CPUs available to a specific container: diff --git a/tldr/elasticsearch-keystore b/tldr/elasticsearch-keystore index 68be76af..d94032ce 100644 --- a/tldr/elasticsearch-keystore +++ b/tldr/elasticsearch-keystore @@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git `elasticsearch-keystore add {{setting_name}}` -- Add a setting from standard input: +- Add a setting from `stdin`: `echo "{{setting_value}}" | elasticsearch-keystore add --stdin {{setting_name}}` diff --git a/tldr/kubectl-cluster-info b/tldr/kubectl-cluster-info index 5bc76e45..3f32a92f 100644 --- a/tldr/kubectl-cluster-info +++ b/tldr/kubectl-cluster-info @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `kubectl cluster-info` -- Dump current cluster state to standard output (for debugging): +- Dump current cluster state to `stdout` (for debugging): `kubectl cluster-info dump` diff --git a/tldr/kubectl-proxy b/tldr/kubectl-proxy index e69be38b..de5e6787 100644 --- a/tldr/kubectl-proxy +++ b/tldr/kubectl-proxy @@ -24,7 +24,7 @@ source: https://github.com/tldr-pages/tldr.git `kubectl proxy {{[-p|--port]}} {{port}} {{[-w|--www]}} {{path/to/static_dir}}` -- Run a proxy on a random local port, printing the chosen port to stdout: +- Run a proxy on a random local port, printing the chosen port to `stdout`: `kubectl proxy {{[-p|--port]}} 0` diff --git a/tldr/linux/aa-decode b/tldr/linux/aa-decode index cd8cbae2..d48ca7f7 100644 --- a/tldr/linux/aa-decode +++ b/tldr/linux/aa-decode @@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git `sudo aa-decode {{logfile}}` -- Decode logs from standard input (e.g., redirected file): +- Decode logs from `stdin` (e.g., redirected file): `sudo aa-decode - < {{logfile}}` diff --git a/tldr/linux/dnf-reposync b/tldr/linux/dnf-reposync index d20b269e..4991adf8 100644 --- a/tldr/linux/dnf-reposync +++ b/tldr/linux/dnf-reposync @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git `dnf reposync --repoid {{repo_name}} {{[-n|--newest-only]}}` -- Just print URLs of what would be downloaded, don’t download: +- Just print URLs of what would be downloaded, don't download: `dnf reposync --repoid {{repo_name}} {{[-u|--urls]}}` diff --git a/tldr/linux/grub-mount b/tldr/linux/grub-mount index 312ebc69..7a80607d 100644 --- a/tldr/linux/grub-mount +++ b/tldr/linux/grub-mount @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Load a ZFS encryption key from a file: -`grub-mount {{[-K|--zfs-key]}} {{/path/to/zfs.key}} {{/dev/sdX}} {{/mnt}}` +`grub-mount {{[-K|--zfs-key]}} /{{path/to/zfs.key}} {{/dev/sdX}} {{/mnt}}` - Show debugging output for a matching category: diff --git a/tldr/linux/ip-stats b/tldr/linux/ip-stats new file mode 100644 index 00000000..bd530ec4 --- /dev/null +++ b/tldr/linux/ip-stats @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# ip stats + +> Manage and show interface statistics. +> More information: . + +- Show all interface statistics across all network devices: + +`ip {{[st|stats]}}` + +- Show statistics for a specific network interface: + +`ip {{[st|stats]}} show dev {{network_interface}}` + +- Show link-layer statistics (same as `ip -statistics link show`): + +`ip {{[st|stats]}} show group link` + +- Show hardware offload statistics for all devices: + +`ip {{[st|stats]}} show group offload` + +- Show offload statistics for a specific interface: + +`ip {{[st|stats]}} show dev {{network_interface}} group offload` + +- Show a specific offload subgroup: + +`ip {{[st|stats]}} show dev {{network_interface}} group offload subgroup {{l3_stats|cpu_hit|hw_stats_info}}` + +- Show address-family specific statistics (e.g. MPLS): + +`ip {{[st|stats]}} show group afstats subgroup {{mpls}}` + +- Enable Layer 3 hardware statistics collection on a device: + +`ip {{[st|stats]}} set dev {{network_interface}} l3_stats on` diff --git a/tldr/linux/oma b/tldr/linux/oma new file mode 100644 index 00000000..8b239d1d --- /dev/null +++ b/tldr/linux/oma @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# oma + +> A package management frontend for dpkg-based Linux distributions. +> More information: . + +- Enter the interactive package management interface: + +`sudo oma` + +- Install a package: + +`sudo oma install {{package_name}}` + +- Remove a package: + +`sudo oma remove {{package_name}}` + +- Search for a package: + +`oma search {{keyword}}` + +- Show detailed information for a package: + +`oma show` + +- Upgrade all installed packages to their latest versions: + +`sudo oma upgrade` + +- Update the list of available packages and versions (done automatically before `oma install` and `oma upgrade`): + +`sudo oma refresh` + +- Display help: + +`oma help` diff --git a/tldr/linux/patool b/tldr/linux/patool index 48e0cd6d..eef25abf 100644 --- a/tldr/linux/patool +++ b/tldr/linux/patool @@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git `patool list {{path/to/archive}}` -- Compare the contents of two archives and display the differences in the standard output: +- Compare the contents of two archives and display the differences in `stdout`: `patool diff {{path/to/archive1}} {{path/to/archive2}}` diff --git a/tldr/llvm-mc b/tldr/llvm-mc index ec9a76d5..35256885 100644 --- a/tldr/llvm-mc +++ b/tldr/llvm-mc @@ -21,10 +21,10 @@ source: https://github.com/tldr-pages/tldr.git `llvm-mc -o {{path/to/output.s}} {{path/to/input.bc}}` -- Assemble assembly code from standard input stream and show encoding to standard output stream: +- Assemble assembly code from `stdin` and show encoding to `stdout`: `echo "{{addl %eax, %ebx}}" | llvm-mc -show-encoding -show-inst` -- Disassemble machine code from standard input stream for specified triple: +- Disassemble machine code from `stdin` for specified triple: `echo "{{0xCD 0x21}}" | llvm-mc --disassemble -triple={{target_name}}` diff --git a/tldr/multipass b/tldr/multipass index 5b7955c0..89cc04cf 100644 --- a/tldr/multipass +++ b/tldr/multipass @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # multipass > Manage Ubuntu virtual machines using native hypervisors. -> More information: . +> More information: . - List the aliases that can be used to launch an instance: diff --git a/tldr/osx/rargs b/tldr/osx/rargs index 78d455bfb4576a305188cd0214b68a23f56dfa3a..e9902987fdafc5c2300cfaebb7a47135d61226fd 100644 GIT binary patch delta 18 ZcmaFBc9U&F2YW(sNlIp3!p3Q*m;g$D2igDt delta 25 gcmcb~_JD0d2VZeXVqQvOQHnxlUO{Qe#{N@G0Eov5nE(I) diff --git a/tldr/pinta b/tldr/pinta index 3cecc78e..0770e99f 100644 --- a/tldr/pinta +++ b/tldr/pinta @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # pinta > A free, open source program for drawing and image editing. -> More information: . +> More information: . - Start Pinta: diff --git a/tldr/pkl b/tldr/pkl index 64da836a..1c829aa0 100644 --- a/tldr/pkl +++ b/tldr/pkl @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `pkl eval {{module.pkl}}` -- Run as a server that communicates over standard input/output: +- Run as a server that communicates over `stdin` and `stdout`: `pkl server` diff --git a/tldr/poetry-config b/tldr/poetry-config index c2432368..1d10f921 100644 --- a/tldr/poetry-config +++ b/tldr/poetry-config @@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git `poetry config {{config_key}}` -- Change or add a new configuration setting by passing a value after the setting’s name: +- Change or add a new configuration setting by passing a value after the setting's name: `poetry config {{config_key}} {{config_value}}` diff --git a/tldr/poetry-sync b/tldr/poetry-sync index 29314927..75f9baaa 100644 --- a/tldr/poetry-sync +++ b/tldr/poetry-sync @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Syncs your project's environment with the `poetry.lock` file. > More information: . -- Sync your project’s environment with the `poetry.lock` file: +- Sync your project's environment with the `poetry.lock` file: `poetry sync` diff --git a/tldr/python-m-json.tool b/tldr/python-m-json.tool index 6cff7406..6194dbe4 100644 --- a/tldr/python-m-json.tool +++ b/tldr/python-m-json.tool @@ -13,6 +13,6 @@ source: https://github.com/tldr-pages/tldr.git `python -m json.tool {{path/to/file.json}}` -- Validate and pretty-print JSON from standard input: +- Validate and pretty-print JSON from `stdin`: `echo '{{{"key": "value"}}}' | python -m json.tool` diff --git a/tldr/socat b/tldr/socat index b52bf359..171ce8d2 100644 --- a/tldr/socat +++ b/tldr/socat @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `sudo socat - TCP-LISTEN:8080,fork` -- Listen on a port using SSL and print to STDOUT: +- Listen on a port using SSL and print to `stdout`: `sudo socat OPENSSL-LISTEN:4433,reuseaddr,cert=./cert.pem,cafile=./ca.cert.pem,key=./key.pem,verify=0 STDOUT` diff --git a/tldr/st.2 b/tldr/st.2 index c63d417c..cfd4babc 100644 --- a/tldr/st.2 +++ b/tldr/st.2 @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `st {{path/to/file}}` -- Print statistics from standard input: +- Print statistics from `stdin`: `cat {{path/to/file}} | st`