Update cheatsheets

This commit is contained in:
ivuorinen
2025-08-26 00:19:43 +00:00
parent 00aae9d884
commit 114611fd19
16 changed files with 95 additions and 28 deletions

View File

@@ -3,7 +3,7 @@ syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# Colon
# :
> Returns a successful exit status code of 0.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-_003a>.

View File

@@ -3,7 +3,7 @@ syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# Greater than
# >
> Redirect output.
> More information: <https://gnu.org/software/bash/manual/bash.html#Redirecting-Output>.

12
tldr/jj
View File

@@ -11,9 +11,9 @@ source: https://github.com/tldr-pages/tldr.git
- Update description of the revisions specified by given revsets (e.g. `B::D`, `A..D`, `B|C|D`, etc.):
`jj {{[desc|describe]}} {{[-r|--revision]}} {{revsets}}`
`jj {{[desc|describe]}} {{[-m|--message]}} "{{message}}" {{[-r|--revision]}} {{revsets}}`
- Create a new commit/revision on top of a given revision :
- Create a new commit/revision on top of a given revision:
`jj new {{revset}}`
@@ -21,6 +21,14 @@ source: https://github.com/tldr-pages/tldr.git
`jj new {{revset1 revset2 ...}}`
- Update the working copy to point to a revision:
`jj edit {{revset}}`
- Undo the previous command (which may itself have been `undo`):
`jj undo`
- Execute a jj subcommand without snapshotting the working copy:
`jj --ignore-working-copy {{subcommand}}`

View File

@@ -3,7 +3,7 @@ syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# Less than
# <
> Redirect data to `stdin`.
> More information: <https://gnu.org/software/bash/manual/bash.html#Redirecting-Input>.

View File

@@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git
- Rebuild all modules for the currently running kernel:
`dkms autoinstall`
`sudo dkms autoinstall`
- Install version 1.2.1 of the acpi_call module for the currently running kernel:
`dkms install -m {{acpi_call}} -v {{1.2.1}}`
`sudo dkms install -m {{acpi_call}} -v {{1.2.1}}`
- Remove version 1.2.1 of the acpi_call module from all kernels:
`dkms remove -m {{acpi_call}} -v {{1.2.1}} --all`
`sudo dkms remove -m {{acpi_call}} -v {{1.2.1}} --all`

34
tldr/linux/gdbus Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# gdbus
> Interact with D-Bus objects.
> Part of GLib.
> More information: <https://manned.org/gdbus>.
- List all names on the session bus:
`gdbus list-names --session`
- List all names on the system bus:
`gdbus list-names --system`
- Introspect an object to see its interfaces and methods:
`gdbus introspect --session --dest {{destination_bus_name}} --object-path /{{path/to/object}}`
- Call a method on an object with arguments:
`gdbus call --session --dest {{destination_bus_name}} --object-path /{{path/to/object}} --method {{interface.method_name}} {{argument1 argument2 ...}}`
- Emit a signal from an object with arguments:
`gdbus emit --session --object-path /{{path/to/object}} --signal {{interface.signal_name}} {{argument1 argument2 ...}}`
- Monitor all messages on the session bus:
`gdbus monitor --session`

View File

@@ -6,13 +6,17 @@ source: https://github.com/tldr-pages/tldr.git
# lvdisplay
> Display information about Logical Volume Manager (LVM) logical volumes.
> See also: `lvm`.
> See also: `lvm`, `lvs`.
> More information: <https://manned.org/lvdisplay>.
- Display information about all logical volumes:
`sudo lvdisplay`
- Display the information in a short format (same as running `lvs`):
`sudo lvdisplay {{[-C|--columns]}}`
- Display information about all logical volumes in volume group vg1:
`sudo lvdisplay {{vg1}}`

17
tldr/linux/pct-console Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# pct console
> Attach to a container TTY.
> More information: <https://pve.proxmox.com/pve-docs/pct.1.html>.
- Attach to a terminal:
`pct console {{100}}`
- Detach from a terminal:
`<Ctrl a><q>`

View File

@@ -11,8 +11,8 @@ source: https://github.com/tldr-pages/tldr.git
- Initialize the `/dev/sda1` volume for use by LVM:
`pvcreate {{/dev/sda1}}`
`pvcreate {{/dev/sdXY}}`
- Force the creation without any confirmation prompts:
`pvcreate --force {{/dev/sda1}}`
`pvcreate {{[-f|--force]}} {{/dev/sdXY}}`

View File

@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
- Display detailed output during the operation:
`sudo pvremove --verbose {{/dev/sdXY}}`
`sudo pvremove {{[-v|--verbose]}} {{/dev/sdXY}}`
- Remove a LVM label without asking for confirmation:
`sudo pvremove --yes {{/dev/sdXY}}`
`sudo pvremove {{[-y|--yes]}} {{/dev/sdXY}}`
- Forcefully remove a LVM label:
`sudo pvremove --force {{/dev/sdXY}}`
`sudo pvremove {{[-f|--force]}} {{/dev/sdXY}}`
- Display output in JSON format:

View File

@@ -5,13 +5,17 @@ source: https://github.com/tldr-pages/tldr.git
---
# qm disk rescan
> Rescan all storages and update disk sizes and unused disk images of a virtual machine.
> Rescan all storages and update disk sizes and unused disk images of virtual machines.
> More information: <https://pve.proxmox.com/pve-docs/qm.1.html>.
- Rescan all storages and update disk sizes and unused disk images of a specific virtual machine:
- Rescan all storages and update disk sizes and unused disk images:
`qm {{[di|disk]}} {{[resc|rescan]}} {{vm_id}}`
`qm {{[di|disk]}} {{[resc|rescan]}}`
- Perform a dry-run of rescan on a specific virtual machine and do not write any changes to configurations:
- Perform a dry-run of a rescan and do not write any changes to configurations:
`qm {{[di|disk]}} {{[resc|rescan]}} --dryrun {{true}} {{vm_id}}`
`qm {{[di|disk]}} {{[resc|rescan]}} --dryrun`
- Specify a virtual machine by its ID:
`qm {{[di|disk]}} {{[resc|rescan]}} --vmid {{100}}`

View File

@@ -3,7 +3,7 @@ syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# umount
# unmount
> The correct command is `umount` (u-mount).
> More information: <https://manned.org/umount.8>.

View File

@@ -11,8 +11,8 @@ source: https://github.com/tldr-pages/tldr.git
- Change the activation status of logical volumes in all volume groups:
`sudo vgchange --activate {{y|n}}`
`sudo vgchange {{[-a|--activate]}} {{y|n}}`
- Change the activation status of logical volumes in the specified volume group (determine with `vgscan`):
`sudo vgchange --activate {{y|n}} {{volume_group}}`
`sudo vgchange {{[-a|--activate]}} {{y|n}} {{volume_group}}`

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Forcefully remove a volume group without confirmation:
`vgremove --force {{volume_group}}`
`vgremove {{[-f|--force]}} {{volume_group}}`
- Set the debug level for detailed logging to level 2, (repeat `--debug` up to 6 times to increase the level):
`vgremove --debug --debug {{volume_group}}`
`vgremove {{[-d|--debug]}} {{[-d|--debug]}} {{volume_group}}`
- Use a specific config setting to override defaults:
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display help text for usage information:
`vgremove --help`
`vgremove {{[-h|--help]}}`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# rename
> Rename a file or group of files with a regular expression.
> Rename a file or group of files with a `regex`.
> WARNING: This command will overwrite files without prompting unless the dry-run option is used.
> Note: This page refers to the Perl version, also known as `file-rename`.
> More information: <https://manned.org/prename>.
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
- Change the extension:
`rename 's/\.old$/\.new/' {{*.txt}}`
`rename 's/\.{{old}}$/\.{{new}}/' {{*.txt}}`
- Change to lowercase (use `-f` in case-insensitive filesystems):

View File

@@ -3,7 +3,7 @@ syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# Vertical bar
# |
> Pipe data between programs.
> More information: <https://gnu.org/software/bash/manual/bash.html#Pipelines>.