Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-11 00:18:53 +00:00
parent d2ae2c7f65
commit 5913523ab3
18 changed files with 240 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
> See also: `lp`, `lpmove`, `lpstat`.
> More information: <https://openprinting.github.io/cups/doc/man-cancel.html>.
- Cancel the current job of the default printer (set with `lpoptions -d {{printer}}`):
- Cancel the current job of the default printer (set with `lpoptions -d printer_name`):
`cancel`

View File

@@ -16,11 +16,3 @@ source: https://github.com/tldr-pages/tldr.git
- Print the hexadecimal representation of the first n bytes of a file:
`hexyl {{[-n|--length]}} {{n}} {{path/to/file}}`
- Print bytes 512 through 1024 of a file:
`hexyl -r {{512}}:{{1024}} {{path/to/file}}`
- Print 512 bytes starting at the 1024th byte:
`hexyl -r {{1024}}:+{{512}} {{path/to/file}}`

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Show information about the specific commit, rather than the latest version:
`flatpak remote-info --commit={{COMMIT}} {{remote_name}} {{com.example.app}}`
`flatpak remote-info --commit {{COMMIT}} {{remote_name}} {{com.example.app}}`

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Update/Downgrade to a specific commit (also see flatpak remote-info and flatpak mask):
`flatpak update --commit={{COMMIT}} {{com.example.app}}`
`flatpak update --commit {{COMMIT}} {{com.example.app}}`

37
tldr/linux/hyprshot Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# hyprshot
> Screenshot utility for the Hyprland Wayland compositor.
> More information: <https://github.com/Gustash/Hyprshot>.
- Select and take a screenshot of a region:
`hyprshot {{[-m|--mode]}} region`
- Select and take a screenshot of a specific window:
`hyprshot {{[-m|--mode]}} window`
- Select and take a screenshot of a specific output:
`hyprshot {{[-m|--mode]}} output`
- Take a screenshot of the currently active window:
`hyprshot {{[-m|--mode]}} active {{[-m|--mode]}} window`
- Freeze the screen and take a screenshot of the selected region:
`hyprshot {{[-z|--freeze]}} {{[-m|--mode]}} region`
- Select and take a screenshot of a specific window, saving to the given output directory:
`hyprshot {{[-o|--output-folder]}} {{path/to/directory}} {{[-m|--mode]}} window`
- Select and take a screenshot of a specific output, saving the screenshot to the clipboard only:
`hyprshot --clipboard {{[-m|--mode]}} output`

View File

@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Compile a component without updating its local code and without compiling its dependencies:
`kde-builder {{[-S|--no-src]}} {{[-D|--no-include-dependencies]}} {{component_name}}`
`kde-builder {{[-SD|--no-src --no-include-dependencies]}} {{component_name}}`
- Refresh the build directories before compiling:

33
tldr/linux/lvm_import_vdo Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lvm_import_vdo
> Import a VDO volume created by the VDO manager into an LVM-managed logical volume (irreversible).
> More information: <https://manned.org/lvm_import_vdo>.
- Import a VDO volume with automatic names for the VG/LV:
`lvm_import_vdo {{/dev/mapper/vdo_volume}}`
- Import and set the destination VG/LV name:
`lvm_import_vdo {{[-n|--name]}} {{vg_name/lv_name}} {{/dev/mapper/vdo_volume}}`
- Show what would be done without changing anything:
`lvm_import_vdo --dry-run {{/dev/mapper/vdo_volume}}`
- Convert in place without using a temporary snapshot (less safe):
`lvm_import_vdo --no-snapshot {{/dev/mapper/vdo_volume}}`
- Verbose output and automatically answer "yes" to prompts:
`lvm_import_vdo {{[-v|--verbose]}} {{[-y|--yes]}} {{/dev/mapper/vdo_volume}}`
- Use a VDO manager configuration file during import:
`lvm_import_vdo --vdo-config {{path/to/vdo.conf}} {{/dev/mapper/vdo_volume}}`

33
tldr/linux/lvmconfig Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lvmconfig
> Display and manipulate LVM configuration information.
> More information: <https://manned.org/lvmconfig>.
- Display the effective configuration in use (after merging all config sources):
`lvmconfig --typeconfig current --mergedconfig`
- Show only settings that differ from their defaults:
`lvmconfig --typeconfig diff`
- List all configuration keys:
`lvmconfig {{[-l|--list]}}`
- Print the default configuration with full comments and extra spacing:
`lvmconfig --typeconfig default --withcomments --withspaces`
- Validate the full merged configuration and report errors:
`lvmconfig --mergedconfig --validate`
- Write the current effective configuration to a file:
`lvmconfig --typeconfig current {{[-f|--file]}} {{path/to/output.conf}}`

41
tldr/linux/lvmdevices Normal file
View File

@@ -0,0 +1,41 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lvmdevices
> Manage the LVM devices file that lists block devices allowed for physical volumes.
> More information: <https://manned.org/lvmdevices>.
- List devices recorded in the devices file:
`lvmdevices`
- Add a device to the devices file:
`lvmdevices --adddev {{/dev/sdXN}}`
- Remove a device from the devices file:
`lvmdevices --deldev {{/dev/sdXN}}`
- Add a physical volume by its PVID:
`lvmdevices --addpvid {{PVID}}`
- Remove a physical volume by its PVID:
`lvmdevices --delpvid {{PVID}}`
- Update the devices file after device names change:
`lvmdevices --update`
- Check the devices file for problems:
`lvmdevices --check`
- Display version:
`lvmdevices --version`

21
tldr/linux/lvmdiskscan Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lvmdiskscan
> Scan for devices that may be used as physical volumes by LVM (deprecated; prefer `pvs`).
> More information: <https://manned.org/lvmdiskscan>.
- Scan all devices:
`lvmdiskscan`
- Show only physical volumes (PVs):
`lvmdiskscan {{[-l|--lvmpartition]}}`
- Increase verbosity (repeat for more detail):
`lvmdiskscan {{[-v|--verbose]}}`

26
tldr/linux/lvmdump Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# lvmdump
> Collect diagnostic information about LVM2 (Logical Volume Manager).
> By default, outputs a compressed tar archive with system and configuration data in the home directory.
> More information: <https://manned.org/lvmdump>.
- Generate a basic dump:
`lvmdump`
- Generate an extended dump with metadata and daemon info:
`lvmdump -a -l -m`
- Dump the information into a directory instead of a tarball:
`lvmdump -d {{path/to/directory}}`
- Display help:
`lvmdump -h`

View File

@@ -19,3 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Discover API paths:
`pvesh {{[l|ls]}} {{/}}`
- Display API path usage instructions:
`pvesh {{[u|usage]}} {{/pools}}`

View File

@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Update all packages in the current environment:
`mamba update --all`
`mamba update {{[-a|--all]}}`
- Search for a specific package across repositories:
@@ -27,11 +27,11 @@ source: https://github.com/tldr-pages/tldr.git
- List all environments:
`mamba info --envs`
`mamba info {{[-e|--envs]}}`
- Remove unused [p]ackages and [t]arballs from the cache:
- Remove unused packages and tarballs from the cache:
`mamba clean -pt`
`mamba clean {{[-pt|--packages --tarballs]}}`
- Activate an environment:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- List the dependencies of a package installed in the currently activated environment, in a tree format:
`mamba repoquery depends --tree {{scipy}}`
`mamba repoquery depends {{[-t|--tree]}} {{scipy}}`
- Print packages in the current environment that require a particular package to be installed (i.e. inverse of `depends`):

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mlr
> Miller is like `awk`, `sed`, `cut`, `join`, and `sort` for name-indexed data such as CSV, TSV, and tabular JSON.
> More information: <https://johnkerl.org/miller/doc>.
> More information: <https://miller.readthedocs.io>.
- Pretty-print a CSV file in a tabular format:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> A fast, local neural text to speech system.
> Try out and download speech models from <https://rhasspy.github.io/piper-samples>.
> More information: <https://github.com/rhasspy/piper>.
> More information: <https://github.com/OHF-Voice/piper1-gpl>.
- Output a WAV [f]ile using a text-to-speech [m]odel (assuming a configuration file at model_path + .json):

33
tldr/windows/runas Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# runas
> Run a program as another user.
> More information: <https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11)>.
- Run a program as the Administrator local user:
`runas /user:.\Administrator "{{command}}"`
- Run a program as a specific user:
`runas /user:{{domain\username}} "{{command}}"`
- Run a program without loading the user's profile:
`runas /noprofile /user:{{domain\username}} "{{command}}"`
- Open Command Prompt as another user:
`runas /user:{{domain\username}} cmd`
- Run Notepad as a specific user with the current user's environment variables, opening a file with escaped quotes:
`runas /env /user:{{domain\username}} "notepad \"{{C:\path o ile.txt}}\""`
- Run Active Directory Users and Computers as a specific user:
`runas /env /user:{{domain\username}} "mmc %windir%\system32\dsa.msc"`

View File

@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
`xteddy`
- Use the window manager to display the teddy bear and ignore the "quit" (`q`) command:
- Use the window manager to display the teddy bear and ignore the "quit" (`<q>`) command:
`xteddy -wm -noquit`