mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 08:43:50 +00:00
Update cheatsheets
This commit is contained in:
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Convert a specific `.adoc` file to HTML and link a CSS stylesheet:
|
||||
|
||||
`asciidoctor {{[-a|--attribute]}} stylesheet {{path/to/stylesheet.css}} {{path/to/file.adoc}}`
|
||||
`asciidoctor {{[-a|--attribute]}} stylesheet={{path/to/stylesheet.css}} {{path/to/file.adoc}}`
|
||||
|
||||
- Convert a specific `.adoc` file to embeddable HTML, removing everything except the body:
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Convert a specific `.adoc` file to a PDF using the `asciidoctor-pdf` library:
|
||||
|
||||
`asciidoctor {{[-b|--backend]}} {{pdf}} {{[-r|--require ]}}{{asciidoctor-pdf}} {{path/to/file.adoc}}`
|
||||
`asciidoctor {{[-b|--backend]}} pdf {{[-r|--require]}} asciidoctor-pdf {{path/to/file.adoc}}`
|
||||
|
||||
29
tldr/automake
Normal file
29
tldr/automake
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# automake
|
||||
|
||||
> Automated Makefile generation for software projects using GNU standards.
|
||||
> More information: <https://www.gnu.org/software/automake/manual/automake.html#automake-Invocation>.
|
||||
|
||||
- Run automake to regenerate Makefiles after editing `Makefile.am`:
|
||||
|
||||
`automake`
|
||||
|
||||
- Generate `Makefile.in` for a non-GNU project (foreign mode):
|
||||
|
||||
`automake --foreign`
|
||||
|
||||
- Add verbose output for debugging:
|
||||
|
||||
`automake {{[-v|--verbose]}}`
|
||||
|
||||
- Add missing standard files (INSTALL, COPYING, depcomp, etc.):
|
||||
|
||||
`automake {{[-a|--add-missing]}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`automake --help`
|
||||
25
tldr/kubectl-cluster-info
Normal file
25
tldr/kubectl-cluster-info
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kubectl cluster-info
|
||||
|
||||
> Display endpoint information about the Kubernetes master and services in the cluster.
|
||||
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_cluster-info/>.
|
||||
|
||||
- Show basic cluster information:
|
||||
|
||||
`kubectl cluster-info`
|
||||
|
||||
- Dump current cluster state to standard output (for debugging):
|
||||
|
||||
`kubectl cluster-info dump`
|
||||
|
||||
- Dump cluster state to a directory:
|
||||
|
||||
`kubectl cluster-info dump --output-directory {{path/to/directory}}`
|
||||
|
||||
- Use a specific kubeconfig context:
|
||||
|
||||
`kubectl cluster-info --context {{context_name}}`
|
||||
29
tldr/kubectl-explain
Normal file
29
tldr/kubectl-explain
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kubectl explain
|
||||
|
||||
> Display the documentation of a Kubernetes API resource, including available fields and descriptions.
|
||||
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_explain/>.
|
||||
|
||||
- Show documentation for a resource:
|
||||
|
||||
`kubectl explain {{pods|nodes|deployments|...}}`
|
||||
|
||||
- Show documentation for a sub-resource or field of an object:
|
||||
|
||||
`kubectl explain {{pod.spec.containers}}`
|
||||
|
||||
- Show documentation for a specific versioned resource:
|
||||
|
||||
`kubectl explain {{ingress.v1.networking.k8s.io}}`
|
||||
|
||||
- Show all fields recursively for a resource:
|
||||
|
||||
`kubectl explain {{po|pods}} --recursive`
|
||||
|
||||
- Display help:
|
||||
|
||||
`kubectl explain --help`
|
||||
41
tldr/kubectl-proxy
Normal file
41
tldr/kubectl-proxy
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# kubectl proxy
|
||||
|
||||
> Create a proxy server or application-level gateway between localhost and the Kubernetes API server.
|
||||
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_proxy/>.
|
||||
|
||||
- Run a proxy using the default settings on port 8001 and listen on localhost:
|
||||
|
||||
`kubectl proxy`
|
||||
|
||||
- Proxy part of the Kubernetes API while serving static files from a local directory:
|
||||
|
||||
`kubectl proxy {{[-w|--www]}} {{path/to/static_dir}} {{[-P|--www-prefix]}} {{/static_prefix/}} --api-prefix {{/api_subset/}}`
|
||||
|
||||
- Proxy the entire Kubernetes API under a custom prefix:
|
||||
|
||||
`kubectl proxy --api-prefix {{/custom_prefix/}}`
|
||||
|
||||
- Serve the Kubernetes API on a specific port while also serving static content:
|
||||
|
||||
`kubectl proxy {{[-p|--port]}} {{port}} {{[-w|--www]}} {{path/to/static_dir}}`
|
||||
|
||||
- Run a proxy on a random local port, printing the chosen port to stdout:
|
||||
|
||||
`kubectl proxy {{[-p|--port]}} 0`
|
||||
|
||||
- Run the proxy on a Unix domain socket instead of a TCP port:
|
||||
|
||||
`kubectl proxy {{[-u|--unix-socket]}} {{path/to/socket}}`
|
||||
|
||||
- Accept connections from remote hosts by listening on all interfaces (use caution when exposing the proxy publicly):
|
||||
|
||||
`kubectl proxy --address 0.0.0.0 --accept-hosts '.*'`
|
||||
|
||||
- Allow only selected API paths while rejecting sensitive endpoints:
|
||||
|
||||
`kubectl proxy --accept-paths '^/api/v1/namespaces/default/.*' --reject-paths '^/api/.*/pods/.*/exec'`
|
||||
@@ -28,7 +28,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`apparmor_parser {{[-p|--preprocess]}} {{[-o|--ofile]}} {{path/to/output.cache}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}`
|
||||
|
||||
- Preprocess and print binary profile to stdout without loading:
|
||||
- Preprocess and print binary profile to `stdout` without loading:
|
||||
|
||||
`apparmor_parser {{[-p|--preprocess]}} {{[-S|--stdout]}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}`
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# intercept
|
||||
|
||||
> Read raw input events from a specified input event device and redirect it to stdout.
|
||||
> Read raw input events from a specified input event device and redirect it to `stdout`.
|
||||
> More information: <https://gitlab.com/interception/linux/tools/-/tree/master#intercept>.
|
||||
|
||||
- Read and output raw input events from a given input device file (the system will not see any key presses):
|
||||
|
||||
25
tldr/linux/pipewire-pulse
Normal file
25
tldr/linux/pipewire-pulse
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pipewire-pulse
|
||||
|
||||
> Start a PulseAudio-compatible daemon for PipeWire.
|
||||
> More information: <https://docs.pipewire.org/page_man_pipewire-pulse_1.html>.
|
||||
|
||||
- Start the daemon with default settings:
|
||||
|
||||
`pipewire-pulse`
|
||||
|
||||
- Start the daemon with a specific configuration file:
|
||||
|
||||
`pipewire-pulse {{[-c|--config]}} {{path/to/pipewire-pulse.conf}}`
|
||||
|
||||
- Increase the verbosity level (use multiple times for more verbosity, e.g. `-vvv`):
|
||||
|
||||
`pipewire-pulse {{[-v|--verbose]}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pipewire-pulse {{[-h|--help]}}`
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all virtual machines:
|
||||
|
||||
`qm {{[l|list]}}`
|
||||
`qm list`
|
||||
|
||||
- List all virtual machines with a full status about the ones which are currently running:
|
||||
|
||||
`qm {{[l|list]}} --full 1`
|
||||
`qm list --full 1`
|
||||
|
||||
29
tldr/linux/sulogin
Normal file
29
tldr/linux/sulogin
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# sulogin
|
||||
|
||||
> Log in as root during single-user mode.
|
||||
> More information: <https://manned.org/man/sulogin>.
|
||||
|
||||
- Start `sulogin` on the default console:
|
||||
|
||||
`sudo sulogin`
|
||||
|
||||
- Start `sulogin` on a specific TTY device:
|
||||
|
||||
`sudo sulogin {{/dev/ttyX}}`
|
||||
|
||||
- Set a maximum timeout(in seconds) for entering the root password before continuing normal boot:
|
||||
|
||||
`sudo sulogin {{[-t|--timeout]}} {{timeout}}`
|
||||
|
||||
- Start root's shell as a login shell:
|
||||
|
||||
`sudo sulogin {{[-p|--login-shell]}}`
|
||||
|
||||
- Force a root shell without asking for a password when default methods of obtaining the password fail:
|
||||
|
||||
`sudo sulogin {{[-e|--force]}}`
|
||||
41
tldr/linux/ventoy
Normal file
41
tldr/linux/ventoy
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ventoy
|
||||
|
||||
> A tool to create bootable USB drives using ISO files.
|
||||
> More information: <https://www.ventoy.net/en/doc_start.html#doc_linux_cli>.
|
||||
|
||||
- Install Ventoy to a specific drive with the defaults:
|
||||
|
||||
`ventoy -i {{/dev/sdX}}`
|
||||
|
||||
- Install Ventoy with GPT partition style instead of MBR:
|
||||
|
||||
`ventoy -i -g {{/dev/sdX}}`
|
||||
|
||||
- Install Ventoy with GPT partition style and a custom partition label and secure boot disabled:
|
||||
|
||||
`ventoy -i -g -S -L {{LABEL_NAME}} {{/dev/sdX}}`
|
||||
|
||||
- Install Ventoy and reserve space at the end of the disk:
|
||||
|
||||
`ventoy -i -r {{SIZE_MB}} {{/dev/sdX}}`
|
||||
|
||||
- Force install Ventoy (overwrites existing installation):
|
||||
|
||||
`ventoy -I {{/dev/sdX}}`
|
||||
|
||||
- Update Ventoy on a drive:
|
||||
|
||||
`ventoy -u {{/dev/sdX}}`
|
||||
|
||||
- Display Ventoy information for a drive:
|
||||
|
||||
`ventoy -l {{/dev/sdX}}`
|
||||
|
||||
- Try non-destructive installation if possible (Ventoy will not reformat the disk):
|
||||
|
||||
`ventoy -i -n {{/dev/sdX}}`
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`mac-cleanup {{[-n|--dry-run]}}`
|
||||
|
||||
- Specify the directory with custom cleanup path:
|
||||
- Specify the directory with custom cleanup modules:
|
||||
|
||||
`mac-cleanup {{[-p|--custom-path]}} {{path/to/directory}}`
|
||||
|
||||
|
||||
33
tldr/pg_amcheck
Normal file
33
tldr/pg_amcheck
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pg_amcheck
|
||||
|
||||
> Check for corruption in one or more PostgreSQL databases.
|
||||
> More information: <https://www.postgresql.org/docs/current/app-pgamcheck.html>.
|
||||
|
||||
- Check a specific database:
|
||||
|
||||
`pg_amcheck {{dbname}}`
|
||||
|
||||
- Check all databases:
|
||||
|
||||
`pg_amcheck {{[-a|--all]}}`
|
||||
|
||||
- Check databases matching the specified pattern:
|
||||
|
||||
`pg_amcheck {{[-d|--database]}} {{pattern}}`
|
||||
|
||||
- Check specific tables within a database:
|
||||
|
||||
`pg_amcheck {{[-t|--table]}} {{pattern}} {{dbname}}`
|
||||
|
||||
- Check specific schemas within a database:
|
||||
|
||||
`pg_amcheck {{[-s|--schema]}} {{pattern}} {{dbname}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pg_amcheck {{[-?|--help]}}`
|
||||
42
tldr/pg_combinebackup
Normal file
42
tldr/pg_combinebackup
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pg_combinebackup
|
||||
|
||||
> Reconstruct a full (synthetic) PostgreSQL backup from an incremental backup chain.
|
||||
> When specifying multiple backups order them from oldest to newest.
|
||||
> More information: <https://www.postgresql.org/docs/current/app-pgcombinebackup.html>.
|
||||
|
||||
- Combine a full and incremental backup into one synthetic full backup:
|
||||
|
||||
`pg_combinebackup {{path/to/full_backup}} {{path/to/incremental_backup}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Perform a dry run to show what would be done, without creating files:
|
||||
|
||||
`pg_combinebackup {{[-n|--dry-run]}} {{path/to/full_backup}} {{path/to/incremental_backup}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Use hard links instead of copying files (faster, same filesystem required):
|
||||
|
||||
`pg_combinebackup {{[-k|--link]}} {{path/to/full_backup}} {{path/to/incremental_backup}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Use file cloning (reflinks) for efficient copy if supported:
|
||||
|
||||
`pg_combinebackup --clone {{path/to/full_backup}} {{path/to/incremental_backup}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Use the `copy_file_range` system call for efficient copying:
|
||||
|
||||
`pg_combinebackup --copy-file-range {{path/to/full_backup}} {{path/to/incremental_backup}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Relocate a tablespace during reconstruction:
|
||||
|
||||
`pg_combinebackup {{path/to/backup1 path/to/backup2 ...}} {{[-T|--tablespace-mapping]}} /{{path/to/old_tablespace}}=/{{path/to/new_tablespace}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Disable fsync for faster but unsafe writes (testing only):
|
||||
|
||||
`pg_combinebackup {{[-N|--no-sync]}} {{path/to/backup1 path/to/backup2 ...}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
|
||||
- Show detailed debug output:
|
||||
|
||||
`pg_combinebackup {{[-d|--debug]}} {{path/to/backup1 path/to/backup2 ...}} {{[-o|--output]}} {{path/to/output_directory}}`
|
||||
21
tldr/pg_controldata
Normal file
21
tldr/pg_controldata
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pg_controldata
|
||||
|
||||
> Display control information of a PostgreSQL database cluster.
|
||||
> More information: <https://www.postgresql.org/docs/current/app-pgcontroldata.html>.
|
||||
|
||||
- Display control information for a specific data directory:
|
||||
|
||||
`pg_controldata {{[-D|--pgdata]}} {{path/to/data}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pg_controldata {{[-?|--help]}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`pg_controldata {{[-V|--version]}}`
|
||||
33
tldr/poetry-config
Normal file
33
tldr/poetry-config
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# poetry config
|
||||
|
||||
> Edit poetry config settings and repositories.
|
||||
> More information: <https://python-poetry.org/docs/cli/#config>.
|
||||
|
||||
- List current configuration:
|
||||
|
||||
`poetry config --list`
|
||||
|
||||
- Remove the a previously set setting:
|
||||
|
||||
`poetry config {{config_key}} --unset`
|
||||
|
||||
- See the value of a specific setting:
|
||||
|
||||
`poetry config {{config_key}}`
|
||||
|
||||
- Change or add a new configuration setting by passing a value after the setting’s name:
|
||||
|
||||
`poetry config {{config_key}} {{config_value}}`
|
||||
|
||||
- Migrate outdated configuration settings:
|
||||
|
||||
`poetry config --migrate`
|
||||
|
||||
- Set/Get settings that are specific to a project:
|
||||
|
||||
`poetry config --local`
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`tspin {{path/to/application.log}}`
|
||||
|
||||
- Read from another command and print to stdout:
|
||||
- Read from another command and print to `stdout`:
|
||||
|
||||
`journalctl {{[-b|--boot]}} {{[-f|--follow]}} | tspin`
|
||||
|
||||
|
||||
12
tldr/windows/ventoy
Normal file
12
tldr/windows/ventoy
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ventoy
|
||||
|
||||
> This command is an alias of `Ventoy2Disk`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr ventoy2disk`
|
||||
41
tldr/windows/ventoy2disk
Normal file
41
tldr/windows/ventoy2disk
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# Ventoy2Disk
|
||||
|
||||
> A tool to create bootable USB drives using ISO files on Windows systems.
|
||||
> More information: <https://www.ventoy.net/en/doc_windows_cli.html>.
|
||||
|
||||
- Install Ventoy to drive D: with default settings (MBR, Secure Boot enabled):
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /Drive:D:`
|
||||
|
||||
- Install Ventoy with GPT partition style and disable Secure Boot:
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /Drive:D: /GPT /NOSB`
|
||||
|
||||
- Install Ventoy and reserve 4GB space at the end of the disk:
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /Drive:D: /R:4096`
|
||||
|
||||
- Install Ventoy using physical drive number 1 with NTFS filesystem:
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /PhyDrive:1 /FS:NTFS`
|
||||
|
||||
- Install Ventoy without USB type checking (for internal drives):
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /Drive:D: /NOUSBCheck`
|
||||
|
||||
- Update Ventoy on drive D: while keeping current settings:
|
||||
|
||||
`Ventoy2Disk VTOYCLI /U /Drive:D:`
|
||||
|
||||
- Perform non-destructive installation (preserve existing data):
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /Drive:D: /NonDest`
|
||||
|
||||
- Install Ventoy with all options: GPT, no Secure Boot, 2GB reserved, NTFS, no USB check:
|
||||
|
||||
`Ventoy2Disk VTOYCLI /I /Drive:D: /GPT /NOSB /R:2048 /FS:NTFS /NOUSBCheck`
|
||||
Reference in New Issue
Block a user