mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/adb-shell-pm
Normal file
41
tldr/adb-shell-pm
Normal file
@@ -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: <https://developer.android.com/tools/adb>.
|
||||
|
||||
- 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|...}}`
|
||||
37
tldr/adb-shell-pm-list
Normal file
37
tldr/adb-shell-pm-list
Normal file
@@ -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: <https://developer.android.com/tools/adb>.
|
||||
|
||||
- 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`
|
||||
@@ -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}}`
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
41
tldr/linux/ip-stats
Normal file
41
tldr/linux/ip-stats
Normal file
@@ -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: <https://manned.org/ip-stats>.
|
||||
|
||||
- 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`
|
||||
41
tldr/linux/oma
Normal file
41
tldr/linux/oma
Normal file
@@ -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: <https://github.com/AOSC-Dev/oma#usage>.
|
||||
|
||||
- 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`
|
||||
@@ -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}}`
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# multipass
|
||||
|
||||
> Manage Ubuntu virtual machines using native hypervisors.
|
||||
> More information: <https://documentation.ubuntu.com/multipass/en/latest/reference/command-line-interface/#>.
|
||||
> More information: <https://documentation.ubuntu.com/multipass/en/latest/reference/command-line-interface/>.
|
||||
|
||||
- List the aliases that can be used to launch an instance:
|
||||
|
||||
|
||||
BIN
tldr/osx/rargs
BIN
tldr/osx/rargs
Binary file not shown.
@@ -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: <https://www.pinta-project.com/user-guide/overview/#>.
|
||||
> More information: <https://www.pinta-project.com/user-guide/overview/>.
|
||||
|
||||
- Start Pinta:
|
||||
|
||||
|
||||
2
tldr/pkl
2
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`
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Syncs your project's environment with the `poetry.lock` file.
|
||||
> More information: <https://python-poetry.org/docs/cli/#sync>.
|
||||
|
||||
- Sync your project’s environment with the `poetry.lock` file:
|
||||
- Sync your project's environment with the `poetry.lock` file:
|
||||
|
||||
`poetry sync`
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user