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:
@@ -11,28 +11,32 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Associate the local install of `asciinema` with an asciinema.org account:
|
||||
|
||||
`asciinema auth`
|
||||
`asciinema {{[a|auth]}}`
|
||||
|
||||
- Make a new recording and save it to a local file (finish it with `<Ctrl d>` or type `exit`):
|
||||
|
||||
`asciinema rec {{path/to/recording.cast}}`
|
||||
`asciinema {{[r|record]}} {{path/to/recording.cast}}`
|
||||
|
||||
- Replay a terminal recording from a local file:
|
||||
|
||||
`asciinema play {{path/to/recording.cast}}`
|
||||
`asciinema {{[p|play]}} {{path/to/recording.cast}}`
|
||||
|
||||
- Replay a terminal recording hosted on <https://asciinema.org>:
|
||||
|
||||
`asciinema play https://asciinema.org/a/{{cast_id}}`
|
||||
`asciinema {{[p|play]}} https://asciinema.org/a/{{cast_id}}`
|
||||
|
||||
- Make a new recording, limiting any idle time to at most 2.5 seconds:
|
||||
|
||||
`asciinema rec {{[-i|--idle-time-limit]}} 2.5`
|
||||
`asciinema {{[r|record]}} {{[-i|--idle-time-limit]}} 2.5`
|
||||
|
||||
- Print the full output of a locally saved recording:
|
||||
|
||||
`asciinema cat {{path/to/recording.cast}}`
|
||||
`asciinema {{[ca|cat]}} {{path/to/recording.cast}}`
|
||||
|
||||
- Upload a locally saved terminal session to asciinema.org:
|
||||
|
||||
`asciinema upload {{path/to/recording.cast}}`
|
||||
`asciinema {{[u|upload]}} {{path/to/recording.cast}}`
|
||||
|
||||
- Stream the current terminal on a local webpage:
|
||||
|
||||
`asciinema {{[st|stream]}} --local`
|
||||
|
||||
37
tldr/linux/lvmpersist
Normal file
37
tldr/linux/lvmpersist
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lvmpersist
|
||||
|
||||
> Manage persistent reservations (PR) on block devices or all PVs in a volume group.
|
||||
> More information: <https://manned.org/lvmpersist>.
|
||||
|
||||
- Start PR on all PVs in a VG with a local key (exclusive access by default):
|
||||
|
||||
`lvmpersist start --ourkey {{0x1234abcd}} --vg {{vg_name}}`
|
||||
|
||||
- Start PR for a shared VG (allow multiple hosts):
|
||||
|
||||
`lvmpersist start --ourkey {{0x1234abcd}} --access {{sh}} --vg {{vg_name}}`
|
||||
|
||||
- Stop PR on a VG and unregister the local key:
|
||||
|
||||
`lvmpersist stop --ourkey {{0x1234abcd}} --vg {{vg_name}}`
|
||||
|
||||
- Take over a local VG by preempting another host while starting PR:
|
||||
|
||||
`lvmpersist start --ourkey {{0xmy_key}} --removekey {{0xother_key}} --vg {{vg_name}}`
|
||||
|
||||
- Remove another host's key from a shared VG:
|
||||
|
||||
`lvmpersist remove --ourkey {{0xmy_key}} --removekey {{0xother_key}} --vg {{vg_name}}`
|
||||
|
||||
- Show registered keys and reservations for a VG:
|
||||
|
||||
`lvmpersist read --vg {{vg_name}}`
|
||||
|
||||
- Operate on specific devices instead of a VG:
|
||||
|
||||
`lvmpersist start --ourkey {{0x1234abcd}} --device {{/dev/sdX}} --device {{/dev/mapper/mpathY}}`
|
||||
21
tldr/linux/systemctl-try-reload-or-restart
Normal file
21
tldr/linux/systemctl-try-reload-or-restart
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl try-reload-or-restart
|
||||
|
||||
> Reload one or more units if they support it; otherwise restart them.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#try-reload-or-restart%20PATTERN%E2%80%A6>.
|
||||
|
||||
- Reload or restart a specific unit:
|
||||
|
||||
`systemctl try-reload-or-restart {{unit}}`
|
||||
|
||||
- Reload or restart multiple units:
|
||||
|
||||
`systemctl try-reload-or-restart {{unit1 unit2 ...}}`
|
||||
|
||||
- Reload or restart all units matching a pattern:
|
||||
|
||||
`systemctl try-reload-or-restart '{{pattern}}'`
|
||||
21
tldr/linux/systemctl-try-restart
Normal file
21
tldr/linux/systemctl-try-restart
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl try-restart
|
||||
|
||||
> Restart one or more units only if they are currently running.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#try-restart%20PATTERN%E2%80%A6>.
|
||||
|
||||
- Restart a specific unit if it is running:
|
||||
|
||||
`systemctl try-restart {{unit}}`
|
||||
|
||||
- Restart multiple units if they are running:
|
||||
|
||||
`systemctl try-restart {{unit1 unit2 ...}}`
|
||||
|
||||
- Restart all units matching a pattern if they are running:
|
||||
|
||||
`systemctl try-restart '{{pattern}}'`
|
||||
4
tldr/omz
4
tldr/omz
@@ -24,6 +24,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`omz plugin list`
|
||||
|
||||
- List all enabled plugins:
|
||||
|
||||
`omz plugin list --enabled`
|
||||
|
||||
- Enable/Disable an Oh My Zsh plugin:
|
||||
|
||||
`omz plugin {{enable|disable}} {{plugin}}`
|
||||
|
||||
@@ -5,26 +5,34 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# poetry-env
|
||||
|
||||
> Manage virtualenvs associated with a Poetry project.
|
||||
> Manage virtual environments associated with a Poetry project.
|
||||
> See also: `asdf`.
|
||||
> More information: <https://python-poetry.org/docs/cli/#env>.
|
||||
|
||||
- Print the command to activate a virtualenv:
|
||||
- Print the command to activate a virtual environment:
|
||||
|
||||
`poetry env activate`
|
||||
|
||||
- Display information about the current environment (-p or -e will display the environment's path or executable):
|
||||
- Display information about the current environment:
|
||||
|
||||
`poetry env info {{[-p|--path]}} {{[-e|--executable]}}`
|
||||
`poetry env info`
|
||||
|
||||
- List all virtualenvs associated with the current project (optionally showing the full path):
|
||||
- Display the path of the current environment:
|
||||
|
||||
`poetry env info {{[-p|--path]}}`
|
||||
|
||||
- Display the path of the current environment's Python executable:
|
||||
|
||||
`poetry env info {{[-e|--executable]}}`
|
||||
|
||||
- List all virtual environments associated with the current project (optionally showing the full path):
|
||||
|
||||
`poetry env list --full-path`
|
||||
|
||||
- Remove specific or all virtualenvs associated with the current project:
|
||||
- Remove specific or all virtual environments associated with the current project:
|
||||
|
||||
`poetry env remove python {{path/to/executable|environment_name}} | poetry env remove --all`
|
||||
|
||||
- Activate or create a virtualenv for the project using the specified python executable:
|
||||
- Activate or create a virtual environment for the project using the specified Python executable:
|
||||
|
||||
`poetry env use python {{path/to/executable}}`
|
||||
|
||||
Reference in New Issue
Block a user