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:
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# choose
|
||||
|
||||
> A human-friendly and fast alternative to cut and (sometimes) awk.
|
||||
> More information: <https://github.com/theryangeary/choose>.
|
||||
> More information: <https://github.com/theryangeary/choose#usage>.
|
||||
|
||||
- Print the 5th item from a line (starting from 0):
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print the first, 3rd, and 5th item from a line, where items are separated by ':' instead of whitespace:
|
||||
|
||||
`choose --field-separator '{{:}}' {{0}} {{2}} {{4}}`
|
||||
`choose {{[-f|--field-separator]}} '{{:}}' {{0}} {{2}} {{4}}`
|
||||
|
||||
- Print everything from the 2nd to 5th item on the line, including the 5th:
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print everything from the 2nd to 5th item on the line, excluding the 5th:
|
||||
|
||||
`choose --exclusive {{1}}:{{4}}`
|
||||
`choose {{[-x|--exclusive]}} {{1}}:{{4}}`
|
||||
|
||||
- Print the beginning of the line to the 3rd item:
|
||||
|
||||
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print all items from the beginning of the line until the 3rd item (exclusive):
|
||||
|
||||
`choose --exclusive :{{2}}`
|
||||
`choose {{[-x|--exclusive]}} :{{2}}`
|
||||
|
||||
- Print all items from the 3rd to the end of the line:
|
||||
|
||||
|
||||
32
tldr/linux/gksu
Normal file
32
tldr/linux/gksu
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gksu
|
||||
|
||||
> Frontend for `su`.
|
||||
> Allows you to run graphical commands which need root access without having to run an X terminal emulator.
|
||||
> Note: This command is deprecated in favor of commands like `pkexec`, and is no longer maintained.
|
||||
> See also: `gksudo`.
|
||||
> More information: <https://manned.org/man/gksudo>.
|
||||
|
||||
- Run a command as a specific user:
|
||||
|
||||
`gksu {{[-u|--user]}} {{userid}} {{command}}`
|
||||
|
||||
- Run the command while preserving the current environments:
|
||||
|
||||
`gksu {{[-u|--user]}} {{userid}} {{[-k|--preserve-env]}} {{command}}`
|
||||
|
||||
- Force `gksu` to use `su` to run the command:
|
||||
|
||||
`gksu {{[-u|--user]}} {{userid}} {{[-w|--su-mode]}} {{command}}`
|
||||
|
||||
- Force `gksu` to use `sudo` to run the command:
|
||||
|
||||
`gksu {{[-u|--user]}} {{userid}} {{[-S|--sudo-mode]}} {{command}}`
|
||||
|
||||
- Output debug info for the given command:
|
||||
|
||||
`gksu {{[-u|--user]}} {{userid}} {{[-d|--debug]}} {{command}}`
|
||||
32
tldr/linux/gksudo
Normal file
32
tldr/linux/gksudo
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gksudo
|
||||
|
||||
> Frontend for `sudo`.
|
||||
> Allows you to run graphical commands which need root access without having to run an X terminal emulator.
|
||||
> Note: This command is deprecated in favor of commands like `pkexec`, and is no longer maintained.
|
||||
> See also: `gksu`.
|
||||
> More information: <https://manned.org/man/gksudo>.
|
||||
|
||||
- Run a command as a specific user:
|
||||
|
||||
`gksudo {{[-u|--user]}} {{userid}} {{command}}`
|
||||
|
||||
- Run the command while preserving the current environments:
|
||||
|
||||
`gksudo {{[-u|--user]}} {{userid}} {{[-k|--preserve-env]}} {{command}}`
|
||||
|
||||
- Force `gksudo` to use `su` to run the command:
|
||||
|
||||
`gksu {{[-u|--user]}} {{userid}} {{[-w|--su-mode]}} {{command}}`
|
||||
|
||||
- Force `gksudo` to use `sudo` to run the command:
|
||||
|
||||
`gksudo {{[-u|--user]}} {{userid}} {{[-S|--sudo-mode]}} {{command}}`
|
||||
|
||||
- Output debug info for the given command:
|
||||
|
||||
`gksudo {{[-u|--user]}} {{userid}} {{[-d|--debug]}} {{command}}`
|
||||
33
tldr/linux/lvchange
Normal file
33
tldr/linux/lvchange
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lvchange
|
||||
|
||||
> Change attributes or the activation state of logical volumes.
|
||||
> More information: <https://manned.org/lvchange>.
|
||||
|
||||
- Activate a logical volume:
|
||||
|
||||
`lvchange {{[-a|--activate]}} y {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Deactivate a logical volume:
|
||||
|
||||
`lvchange {{[-a|--activate]}} n {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Enable autoactivation for a logical volume:
|
||||
|
||||
`lvchange {{[-a|--activate]}} ay {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Set a logical volume to read-only (use `rw` for read-write):
|
||||
|
||||
`lvchange {{[-p|--permission]}} r {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Skip activation for a logical volume:
|
||||
|
||||
`lvchange {{[-k|--setactivationskip]}} y {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Refresh a logical volume using the latest metadata:
|
||||
|
||||
`lvchange --refresh {{/dev/vg_name/lv_name}}`
|
||||
29
tldr/linux/lvconvert
Normal file
29
tldr/linux/lvconvert
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lvconvert
|
||||
|
||||
> Convert or modify the type, redundancy, or state of logical volumes.
|
||||
> More information: <https://manned.org/lvconvert>.
|
||||
|
||||
- Convert a linear logical volume to RAID1 (add one mirror: two copies total):
|
||||
|
||||
`lvconvert --type raid1 {{[-m|--mirrors]}} 1 {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Remove mirroring and convert back to a linear logical volume:
|
||||
|
||||
`lvconvert {{[-m|--mirrors]}} 0 {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Merge a snapshot back into its origin logical volume (applies on next activation):
|
||||
|
||||
`lvconvert --merge {{/dev/vg_name/snapshot_lv}}`
|
||||
|
||||
- Repair a degraded RAID logical volume:
|
||||
|
||||
`lvconvert --repair {{/dev/vg_name/lv_name}}`
|
||||
|
||||
- Convert an existing logical volume into a thin pool with a separate metadata LV:
|
||||
|
||||
`lvconvert --type thin-pool --poolmetadata {{/dev/vg_name/pool_metadata_lv}} {{/dev/vg_name/pool_lv}}`
|
||||
@@ -33,7 +33,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo pacman -Syu --overwrite {{path/to/file}}`
|
||||
|
||||
- Remove not installed packages and unused repositories from the cache (use the flags `Sc` to [c]lean all packages):
|
||||
- Remove not installed packages and unused repositories from the cache (use the flags `Scc` to [c]lean all packages):
|
||||
|
||||
`sudo pacman -Sc`
|
||||
|
||||
|
||||
16
tldr/npm-ls
16
tldr/npm-ls
@@ -8,22 +8,26 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Print installed packages to `stdout`.
|
||||
> More information: <https://docs.npmjs.com/cli/npm-ls>.
|
||||
|
||||
- Print all versions of direct dependencies to `stdout`:
|
||||
- Print all versions of direct dependencies in the current project to `stdout`:
|
||||
|
||||
`npm ls`
|
||||
`npm {{[ls|list]}}`
|
||||
|
||||
- Print all installed packages including peer dependencies:
|
||||
|
||||
`npm ls {{[-a|--all]}}`
|
||||
`npm {{[ls|list]}} {{[-a|--all]}}`
|
||||
|
||||
- Print all globally installed packages:
|
||||
|
||||
`npm {{[ls|list]}} {{[-g|--global]}}`
|
||||
|
||||
- Print dependencies with extended information:
|
||||
|
||||
`npm ls {{[-l|--long]}}`
|
||||
`npm {{[ls|list]}} {{[-l|--long]}}`
|
||||
|
||||
- Print dependencies in parseable format:
|
||||
|
||||
`npm ls {{[-p|--parseable]}}`
|
||||
`npm {{[ls|list]}} {{[-p|--parseable]}}`
|
||||
|
||||
- Print dependencies in JSON format:
|
||||
|
||||
`npm ls --json`
|
||||
`npm {{[ls|list]}} --json`
|
||||
|
||||
@@ -17,6 +17,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pbzip2 -p{{4}} {{path/to/file}}`
|
||||
|
||||
- Compress in combination with tar (options can be passed to `pbzip2`):
|
||||
|
||||
`tar -cf {{path/to/compressed_file}}.tar.bz2 {{[-I|--use-compress-program]}} "pbzip2 {{-option1 -option2 ...}}" {{path/to/file}}`
|
||||
|
||||
- Decompress a file:
|
||||
|
||||
`pbzip2 {{[-d|--decompress]}} {{path/to/compressed_file.bz2}}`
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Forensics tool for validating the integrity of PNG based (PNG, JNG, MNG) image files.
|
||||
> Can also extract embedded images and text from a file.
|
||||
> More information: <https://github.com/pnggroup/pngcheck>.
|
||||
> More information: <https://manned.org/pngcheck>.
|
||||
|
||||
- Verify the integrity of an image file (width, height, and color depth):
|
||||
|
||||
|
||||
41
tldr/rbw
Normal file
41
tldr/rbw
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rbw
|
||||
|
||||
> Unofficial Bitwarden-compatible password manager.
|
||||
> More information: <https://github.com/doy/rbw#configuration>.
|
||||
|
||||
- Log in to the vault:
|
||||
|
||||
`rbw login`
|
||||
|
||||
- Unlock the vault:
|
||||
|
||||
`rbw unlock`
|
||||
|
||||
- List all items in the vault:
|
||||
|
||||
`rbw list`
|
||||
|
||||
- Get a password for an entry:
|
||||
|
||||
`rbw get "{{entry_name}}"`
|
||||
|
||||
- Get a username for an entry:
|
||||
|
||||
`rbw get {{[-f|--field]}} username "{{entry_name}}"`
|
||||
|
||||
- Copy a password to the clipboard:
|
||||
|
||||
`rbw get {{[-c|--clipboard]}} "{{entry_name}}"`
|
||||
|
||||
- Generate a new password with the specified number of characters:
|
||||
|
||||
`rbw generate {{password_length}}`
|
||||
|
||||
- Lock the vault:
|
||||
|
||||
`rbw lock`
|
||||
10
tldr/ts-node
10
tldr/ts-node
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ts-node
|
||||
|
||||
> Run TypeScript code directly, without any compiling.
|
||||
> More information: <https://typestrong.org/ts-node>.
|
||||
> More information: <https://typestrong.org/ts-node/docs/options>.
|
||||
|
||||
- Execute a TypeScript file without compiling (`node` + `tsc`):
|
||||
|
||||
@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a TypeScript file without loading `tsconfig.json`:
|
||||
|
||||
`ts-node --skip-project {{path/to/file.ts}}`
|
||||
`ts-node --skipProject {{path/to/file.ts}}`
|
||||
|
||||
- Evaluate TypeScript code passed as a literal:
|
||||
|
||||
`ts-node --eval '{{console.log("Hello World")}}'`
|
||||
`ts-node {{[-e|--eval]}} '{{console.log("Hello World")}}'`
|
||||
|
||||
- Execute a TypeScript file in script mode:
|
||||
|
||||
@@ -26,8 +26,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Transpile a TypeScript file to JavaScript without executing it:
|
||||
|
||||
`ts-node --transpile-only {{path/to/file.ts}}`
|
||||
`ts-node {{[-T|--transpileOnly]}} {{path/to/file.ts}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`ts-node --help`
|
||||
`ts-node {{[-h|--help]}}`
|
||||
|
||||
Reference in New Issue
Block a user