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:
@@ -17,6 +17,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`bugreportz -p`
|
||||
|
||||
- Write the content of an Android bug report to `stdout`:
|
||||
|
||||
`bugreportz -s`
|
||||
|
||||
- Display help:
|
||||
|
||||
`bugreportz -h`
|
||||
|
||||
14
tldr/at
14
tldr/at
@@ -6,16 +6,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# at
|
||||
|
||||
> Execute commands once at a later time.
|
||||
> Service atd (or atrun) should be running for the actual executions.
|
||||
> Results will be sent to the users mail.
|
||||
> More information: <https://manned.org/at>.
|
||||
|
||||
- Execute commands from `stdin` in 5 minutes (press `Ctrl + D` when done):
|
||||
- Start the `atd` daemon:
|
||||
|
||||
`systemctl start atd`
|
||||
|
||||
- Create commands interactively and execute them in 5 minutes (press `<Ctrl> + D` when done):
|
||||
|
||||
`at now + 5 minutes`
|
||||
|
||||
- Create commands interactively and execute them at a specific time:
|
||||
|
||||
`at {{hh:mm}}`
|
||||
|
||||
- Execute a command from `stdin` at 10:00 AM today:
|
||||
|
||||
`echo "{{./make_db_backup.sh}}" | at 1000`
|
||||
`echo "{{command}}" | at 1000`
|
||||
|
||||
- Execute commands from a given file next Tuesday:
|
||||
|
||||
|
||||
30
tldr/az-image
Normal file
30
tldr/az-image
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# az image
|
||||
|
||||
> Manage custom Virtual Machine Images in Azure.
|
||||
> Part of `azure-cli` (also known as `az`).
|
||||
> More information: <https://learn.microsoft.com/cli/azure/image>.
|
||||
|
||||
- List the custom images under a resource group:
|
||||
|
||||
`az image list --resource-group {{resource_group}}`
|
||||
|
||||
- Create a custom image from managed disks or snapshots:
|
||||
|
||||
`az image create --resource-group {{resource_group}} --name {{name}} --os-type {{windows|linux}} --source {{os_disk_source}}`
|
||||
|
||||
- Delete a custom image:
|
||||
|
||||
`az image delete --name {{name}} --resource-group {{resource_group}}`
|
||||
|
||||
- Show details of a custom image:
|
||||
|
||||
`az image show --name {{name}} --resource-group {{resource_group}}`
|
||||
|
||||
- Update custom images:
|
||||
|
||||
`az image update --name {{name}} --resource-group {{resource_group}} --set {{property=value}}`
|
||||
34
tldr/az-logicapp
Normal file
34
tldr/az-logicapp
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# az logicapp
|
||||
|
||||
> Manage Logic Apps in Azure Cloud Services.
|
||||
> Part of `azure-cli` (also known as `az`).
|
||||
> More information: <https://learn.microsoft.com/cli/azure/logicapp>.
|
||||
|
||||
- Create a logic app:
|
||||
|
||||
`az logicapp create --name {{name}} --resource-group {{resource_group}} --storage-account {{storage_account}}`
|
||||
|
||||
- Delete a logic app:
|
||||
|
||||
`az logicapp delete --name {{name}} --resource-group {{resource_group}}`
|
||||
|
||||
- List logic apps:
|
||||
|
||||
`az logicapp list --resource-group {{resource_group}}`
|
||||
|
||||
- Restart a logic app:
|
||||
|
||||
`az logicapp restart --name {{name}} --resource-group {{resource_group}}`
|
||||
|
||||
- Start a logic app:
|
||||
|
||||
`az logicapp start --name {{name}} --resource-group {{resource_group}}`
|
||||
|
||||
- Stop a logic app:
|
||||
|
||||
`az logicapp stop --name {{name}} --resource-group {{resource_group}}`
|
||||
16
tldr/batch
16
tldr/batch
@@ -5,18 +5,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# batch
|
||||
|
||||
> Execute commands at a later time when the system load levels permit.
|
||||
> Service atd (or atrun) should be running for the actual executions.
|
||||
> More information: <https://manned.org/batch>.
|
||||
> This command is an alias of `at`.
|
||||
|
||||
- Execute commands from `stdin` (press `Ctrl + D` when done):
|
||||
- View documentation for the original command:
|
||||
|
||||
`batch`
|
||||
|
||||
- Execute a command from `stdin`:
|
||||
|
||||
`echo "{{./make_db_backup.sh}}" | batch`
|
||||
|
||||
- Execute commands from a given [f]ile:
|
||||
|
||||
`batch -f {{path/to/file}}`
|
||||
`tldr at`
|
||||
|
||||
@@ -28,3 +28,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- List tag and digest metadata for a container image:
|
||||
|
||||
`gcloud container images list-tags {{image}}`
|
||||
|
||||
- Describe an existing cluster for running containers:
|
||||
|
||||
`gcloud container clusters describe {{cluster_name}}`
|
||||
|
||||
@@ -29,7 +29,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enable debug logs:
|
||||
|
||||
`gcrane {{-v|--verbose} {{subcommand}}`
|
||||
`gcrane {{-v|--verbose}} {{subcommand}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`{{command}} << {{EOF}} <Enter> {{multiline_data}} <Enter> {{EOF}}`
|
||||
|
||||
- Create a here string and pass that into `stdin`:
|
||||
- Create a here string and pass that into `stdin` (achieves the same effect as `echo string |`):
|
||||
|
||||
`{{command}} <<< {{string}}`
|
||||
|
||||
@@ -5,21 +5,26 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cryptsetup
|
||||
|
||||
> Manage plain dm-crypt and LUKS (Linux Unified Key Setup) encrypted volumes.
|
||||
> More information: <https://gitlab.com/cryptsetup/cryptsetup/>.
|
||||
> Manage plain `dm-crypt` and LUKS (Linux Unified Key Setup) encrypted volumes.
|
||||
> Some subcommands such as `luksFormat` have their own usage documentation.
|
||||
> More information: <https://manned.org/cryptsetup>.
|
||||
|
||||
- Initialize a LUKS volume (overwrites all data on the partition):
|
||||
- Initialize a LUKS volume with a passphrase (overwrites all data on the partition):
|
||||
|
||||
`cryptsetup luksFormat {{/dev/sda1}}`
|
||||
`cryptsetup luksFormat {{/dev/sdXY}}`
|
||||
|
||||
- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/target`:
|
||||
- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/mapping_name`:
|
||||
|
||||
`cryptsetup luksOpen {{/dev/sda1}} {{target}}`
|
||||
`cryptsetup open {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
- Display information about a mapping:
|
||||
|
||||
`cryptsetup status {{mapping_name}}`
|
||||
|
||||
- Remove an existing mapping:
|
||||
|
||||
`cryptsetup luksClose {{target}}`
|
||||
`cryptsetup close {{mapping_name}}`
|
||||
|
||||
- Change the LUKS volume's passphrase:
|
||||
- Change a LUKS volume's passphrase:
|
||||
|
||||
`cryptsetup luksChangeKey {{/dev/sda1}}`
|
||||
`cryptsetup luksChangeKey {{/dev/sdXY}}`
|
||||
|
||||
22
tldr/linux/cryptsetup-luksformat
Normal file
22
tldr/linux/cryptsetup-luksformat
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cryptsetup luksFormat
|
||||
|
||||
> Initialize a LUKS partition and the initial key slot (0) with a passphrase or keyfile.
|
||||
> Note: this operation overwrites all data on the partition.
|
||||
> More information: <https://manned.org/cryptsetup-luksFormat>.
|
||||
|
||||
- Initialize a LUKS volume with a passphrase:
|
||||
|
||||
`cryptsetup luksFormat {{/dev/sdXY}}`
|
||||
|
||||
- Initialize a LUKS volume with a keyfile:
|
||||
|
||||
`crypsetup luksFormat {{/dev/sdXY}} {{path/to/keyfile}}`
|
||||
|
||||
- Initialize a LUKS volume with a passphrase and set its label:
|
||||
|
||||
`cryptsetup luksFormat --label {{label}} {{/dev/sdXY}}`
|
||||
31
tldr/linux/cryptsetup-open
Normal file
31
tldr/linux/cryptsetup-open
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cryptsetup open
|
||||
|
||||
> Create a decrypted mapping of an encrypted volume.
|
||||
> Note: with TRIM enabled, minimal data leakage in form of freed block information, perhaps sufficient to determine the filesystem in use may occur.
|
||||
> However, you still most likely want to enable it, because the data inside is still safe and SSDs without TRIM will wear out faster.
|
||||
> More information: <https://manned.org/cryptsetup-open>.
|
||||
|
||||
- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/mapping_name`:
|
||||
|
||||
`cryptsetup open {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
- Use a keyfile instead of a passphrase:
|
||||
|
||||
`cryptsetup open --key-file {{path/to/file}} {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
- Allow the use of TRIM on the device:
|
||||
|
||||
`cryptsetup open --allow-discards {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
- Write the `--allow-discards` option into the LUKS header (the option will then always be used when you open the device):
|
||||
|
||||
`cryptsetup open --allow-discards --persistent {{/dev/sdXY}} {{mapping_name}}`
|
||||
|
||||
- Open a LUKS volume and make the decrypted mapping read-only:
|
||||
|
||||
`cryptsetup open --readonly {{/dev/sdXY}} {{mapping_name}}`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# iwctl
|
||||
|
||||
> Control the `iwd` network supplicant.
|
||||
> More information: <https://iwd.wiki.kernel.org/gettingstarted>.
|
||||
> More information: <https://archive.kernel.org/oldwiki/iwd.wiki.kernel.org/gettingstarted.html>.
|
||||
|
||||
- Start the interactive mode, in this mode you can enter the commands directly, with autocompletion:
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`strace -p {{pid}} -c`
|
||||
|
||||
- Show the [T]ime spent in every system call:
|
||||
- Show the [T]ime spent in every system call and specify the maximum string [s]ize to print:
|
||||
|
||||
`strace -p {{pid}} -T`
|
||||
`strace -p {{pid}} -T -s {{32}}`
|
||||
|
||||
- Start tracing a program by executing it:
|
||||
|
||||
|
||||
25
tldr/linux/upnpc
Normal file
25
tldr/linux/upnpc
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# upnpc
|
||||
|
||||
> Configure port forwarding rules on your router via the UPnP protocol.
|
||||
> More information: <https://manned.org/upnpc>.
|
||||
|
||||
- Forward the external TCP port 80 to port 8080 on a local machine:
|
||||
|
||||
`upnpc -a {{192.168.0.1}} 8080 80 tcp`
|
||||
|
||||
- Delete any port redirection for external TCP port 80:
|
||||
|
||||
`upnpc -d 80 tcp`
|
||||
|
||||
- Get information about UPnP devices on your network:
|
||||
|
||||
`upnpc -s`
|
||||
|
||||
- List existing redirections:
|
||||
|
||||
`upnpc -l`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# magento
|
||||
|
||||
> Manage the Magento PHP framework.
|
||||
> More information: <https://magento.com>.
|
||||
> More information: <https://experienceleague.adobe.com/en/docs/commerce-operations/tools/cli-reference/commerce-on-premises>.
|
||||
|
||||
- Enable one or more modules:
|
||||
|
||||
|
||||
@@ -9,9 +9,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> To send an email the message body is built from `stdin`.
|
||||
> More information: <https://manned.org/mail>.
|
||||
|
||||
- Send a typed email message. The command-line below continues after pressing Enter key. Input CC email-id (optional) press Enter key. Input message text (can be multiline). Press Ctrl-D key to complete the message text:
|
||||
- Open an interactive prompt to check personal mail:
|
||||
|
||||
`mail --subject="{{subject line}}" {{to_user@example.com}}`
|
||||
`mail`
|
||||
|
||||
- Send a typed email message with optional CC. The command-line below continues after pressing `<Enter>`. Input message text (can be multiline). Press `<Ctrl>-D` to complete the message text:
|
||||
|
||||
`mail --subject="{{subject line}}" {{to_user@example.com}} --cc="{{cc_email_address}}"`
|
||||
|
||||
- Send an email that contains file content:
|
||||
|
||||
|
||||
25
tldr/npm-install
Normal file
25
tldr/npm-install
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm install
|
||||
|
||||
> Install node packages.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-install>.
|
||||
|
||||
- Install dependencies listed in package.json:
|
||||
|
||||
`npm install`
|
||||
|
||||
- Download a specific version of a package and add it to the list of dependencies in `package.json`:
|
||||
|
||||
`npm install {{package_name}}@{{version}}`
|
||||
|
||||
- Download the latest version of a package and add it to the list of dev dependencies in `package.json`:
|
||||
|
||||
`npm install {{package_name}} {{-D|--save-dev}}`
|
||||
|
||||
- Download the latest version of a package and install it globally:
|
||||
|
||||
`npm install {{-g|--global}} {{package_name}}`
|
||||
21
tldr/npm-uninstall
Normal file
21
tldr/npm-uninstall
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm uninstall
|
||||
|
||||
> Remove a package.
|
||||
> More information: <https://docs.npmjs.com/cli/v8/commands/npm-uninstall>.
|
||||
|
||||
- Remove a package from the current project:
|
||||
|
||||
`npm uninstall {{package_name}}`
|
||||
|
||||
- Remove a package globally:
|
||||
|
||||
`npm uninstall -g {{package_name}}`
|
||||
|
||||
- Remove multiple packages at once:
|
||||
|
||||
`npm uninstall {{package_name1 package_name2 ...}}`
|
||||
25
tldr/npm-update
Normal file
25
tldr/npm-update
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm update
|
||||
|
||||
> Update packages in the current project.
|
||||
> More information: <https://docs.npmjs.com/cli/commands/npm-update>.
|
||||
|
||||
- Update all packages in the current project:
|
||||
|
||||
`npm update`
|
||||
|
||||
- Update a specific package in the current project:
|
||||
|
||||
`npm update {{package}}`
|
||||
|
||||
- Update a package globally:
|
||||
|
||||
`npm update -g {{package}}`
|
||||
|
||||
- Update multiple packages at once:
|
||||
|
||||
`npm update {{package1 package2 ...}}`
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Directly execute binaries from npm packages, using `pnpm` instead of `npm`.
|
||||
> Note: This command is deprecated! Use `pnpm exec` and `pnpm dlx` instead.
|
||||
> More information: <https://web.archive.org/web/20220117192755/https://pnpm.io/pnpx-cli>.
|
||||
> More information: <https://cuyl.github.io/pnpm.github.io/pnpx-cli>.
|
||||
|
||||
- Execute the binary from a given npm module:
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`unzip {{path/to/archive1.zip path/to/archive2.zip ...}} -d {{path/to/output}}`
|
||||
|
||||
- Extract files/directories from archives to `stdout`:
|
||||
- Extract files/directories from archives to `stdout` alongside the extracted file names:
|
||||
|
||||
`unzip -c {{path/to/archive1.zip path/to/archive2.zip ...}}`
|
||||
|
||||
- Extract the contents of the file(s) to `stdout` alongside the extracted file names:
|
||||
- Extract an archive created on Windows, containing files with non-ASCII (e.g. Chinese or Japanese characters) filenames:
|
||||
|
||||
`unzip -O {{gbk}} {{path/to/archive1.zip path/to/archive2.zip ...}}`
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Register the current device to WARP (must be run before first connection):
|
||||
|
||||
`warp-cli register`
|
||||
`warp-cli registration new`
|
||||
|
||||
- Connect to WARP:
|
||||
|
||||
|
||||
21
tldr/zapier-convert
Normal file
21
tldr/zapier-convert
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# zapier convert
|
||||
|
||||
> Convert a Visual Builder integration to a CLI integration.
|
||||
> More information: <https://github.com/zapier/zapier-platform/blob/main/packages/cli/docs/cli.md#convert>.
|
||||
|
||||
- Convert a visual builder integration:
|
||||
|
||||
`zapier convert {{integration_id}} {{path/to/directory}}`
|
||||
|
||||
- Convert a visual builder integration with a specific version:
|
||||
|
||||
`zapier convert {{integration_id}} {{path/to/directory}} {{-v|--version}}={{version}}`
|
||||
|
||||
- Show extra debugging output:
|
||||
|
||||
`zapier convert --debug`
|
||||
21
tldr/zapier-init
Normal file
21
tldr/zapier-init
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# zapier init
|
||||
|
||||
> Initialize a new Zapier integration.
|
||||
> More information: <https://github.com/zapier/zapier-platform/blob/main/packages/cli/docs/cli.md#init>.
|
||||
|
||||
- Initialize a new Zapier integration:
|
||||
|
||||
`zapier init {{path/to/directory}}`
|
||||
|
||||
- Initialize a new Zapier integration with a specific template:
|
||||
|
||||
`zapier init {{path/to/directory}} {{-t|--template}} {{basic-auth|callback|custom-auth|digest-auth|dynamic-dropdown|files|minimal|oauth1-trello|oauth2|search-or-create|session-auth|typescript}}`
|
||||
|
||||
- Show extra debugging output:
|
||||
|
||||
`zapier init {{-d|--debug}}`
|
||||
Reference in New Issue
Block a user