mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-09 21:46:37 +00:00
Update cheatsheets
This commit is contained in:
2
tldr/[[
2
tldr/[[
@@ -13,7 +13,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`[[ ${{variable}} {{==|!=}} "{{string}}" ]]`
|
||||
|
||||
- Test if a given string conforms the specified glob/regex:
|
||||
- Test if a given string conforms the specified glob/`regex`:
|
||||
|
||||
`[[ ${{variable}} {{==|=~}} {{pattern}} ]]`
|
||||
|
||||
|
||||
2
tldr/ack
2
tldr/ack
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `rg`, which is much faster.
|
||||
> More information: <https://beyondgrep.com/documentation>.
|
||||
|
||||
- Search for files containing a string or regular expression in the current directory recursively:
|
||||
- Search for files containing a string or `regex` in the current directory recursively:
|
||||
|
||||
`ack "{{search_pattern}}"`
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`adb logcat`
|
||||
|
||||
- Display lines that match a regular [e]xpression:
|
||||
- Display lines that match a `reg[e]x`:
|
||||
|
||||
`adb logcat -e {{regular_expression}}`
|
||||
`adb logcat -e {{regex}}`
|
||||
|
||||
- Display logs for a tag in a specific mode ([V]erbose, [D]ebug, [I]nfo, [W]arning, [E]rror, [F]atal, [S]ilent), filtering other tags:
|
||||
|
||||
|
||||
2
tldr/ag
2
tldr/ag
@@ -28,7 +28,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ag foo {{[-G|--file-search-regex]}} bar`
|
||||
|
||||
- Find files whose contents match a regular expression:
|
||||
- Find files whose contents match a `regex`:
|
||||
|
||||
`ag '{{^ba(r|z)$}}'`
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`logcat -f {{path/to/file}}`
|
||||
|
||||
- Display lines that match a regular expression:
|
||||
- Display lines that match a `regex`:
|
||||
|
||||
`logcat --regex {{regular_expression}}`
|
||||
`logcat --regex {{regex}}`
|
||||
|
||||
- Display logs for a specific PID:
|
||||
|
||||
|
||||
10
tldr/apropos
10
tldr/apropos
@@ -8,14 +8,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Search the manual pages for names and descriptions.
|
||||
> More information: <https://manned.org/apropos>.
|
||||
|
||||
- Search for a keyword using a regular expression:
|
||||
- Search for a keyword using a `regex`:
|
||||
|
||||
`apropos {{regular_expression}}`
|
||||
`apropos {{regex}}`
|
||||
|
||||
- Search without restricting the output to the terminal width ([l]ong output):
|
||||
|
||||
`apropos {{[-l|--long]}} {{regular_expression}}`
|
||||
`apropos {{[-l|--long]}} {{regex}}`
|
||||
|
||||
- Search for pages that match all the expressions given:
|
||||
- Search for pages that match all the `regex` given:
|
||||
|
||||
`apropos {{regular_expression_1}} {{[-a|--and]}} {{regular_expression_2}} {{[-a|--and]}} {{regular_expression_3}}`
|
||||
`apropos {{regex_1}} {{[-a|--and]}} {{regex_2}} {{[-a|--and]}} {{regex_3}}`
|
||||
|
||||
@@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`brew search {{keyword}}`
|
||||
|
||||
- Search for casks and formulae using a regular expression:
|
||||
- Search for casks and formulae using a `regex`:
|
||||
|
||||
`brew search /{{regular_expression}}/`
|
||||
`brew search /{{regex}}/`
|
||||
|
||||
- Enable searching through descriptions:
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bzegrep
|
||||
|
||||
> Find extended regular expression patterns in `bzip2` compressed files using `egrep`.
|
||||
> Find extended `regex` patterns in `bzip2` compressed files using `egrep`.
|
||||
> More information: <https://manned.org/bzegrep>.
|
||||
|
||||
- Search for extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-sensitive):
|
||||
- Search for extended `regex` (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-sensitive):
|
||||
|
||||
`bzegrep "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-insensitive):
|
||||
- Search for extended `regex` (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-insensitive):
|
||||
|
||||
`bzegrep {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`bzgrep "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Use extended regular expressions (supports `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode:
|
||||
- Use extended `regex` (supports `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode:
|
||||
|
||||
`bzgrep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Crawl URLs and scan for endpoints, secrets, api keys, file extensions, tokens, and more from a list of domains.
|
||||
> More information: <https://github.com/edoardottt/cariddi/wiki>.
|
||||
|
||||
- Hunt for secrets using custom regexes and output results in JSON:
|
||||
- Hunt for secrets using custom `regex`es and output results in JSON:
|
||||
|
||||
`cat {{path/to/urls.txt}} | cariddi -s -sf {{path/to/custom_secrets.txt}} -json`
|
||||
|
||||
|
||||
2
tldr/cbt
2
tldr/cbt
@@ -24,7 +24,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`cbt lookup "{{table_name}}" "{{row_key}}" columns="{{family1:qualifier1,family2:qualifier2,...}}"`
|
||||
|
||||
- Search up to 5 rows in the current project by a specific regex pattern and print them:
|
||||
- Search up to 5 rows in the current project by a specific `regex` pattern and print them:
|
||||
|
||||
`cbt read "{{table_name}}" regex="{{row_key_pattern}}" count={{5}}`
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`csvgrep {{[-c|--columns]}} {{1}} {{[-m|--match]}} {{string_to_match}} {{data.csv}}`
|
||||
|
||||
- Find rows in which columns 3 or 4 match a certain regular expression:
|
||||
- Find rows in which columns 3 or 4 match a certain `regex`:
|
||||
|
||||
`csvgrep {{[-c|--columns]}} {{3,4}} {{[-r|--regex]}} {{regular_expression}} {{data.csv}}`
|
||||
`csvgrep {{[-c|--columns]}} {{3,4}} {{[-r|--regex]}} {{regex}} {{data.csv}}`
|
||||
|
||||
- Find rows in which the "name" column does NOT include the string "John Doe":
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ctest {{[-N|--show-only]}}`
|
||||
|
||||
- Run a single test based on its name, or filter on a regular expression:
|
||||
- Run a single test based on its name, or filter on a `regex`:
|
||||
|
||||
`ctest --output-on-failure {{[-R|--tests-regex]}} '^{{test_name}}$'`
|
||||
|
||||
2
tldr/dlv
2
tldr/dlv
@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Compile and begin tracing a program:
|
||||
|
||||
`dlv trace {{package}} --regexp '{{regular_expression}}'`
|
||||
`dlv trace {{package}} --regexp '{{regex}}'`
|
||||
|
||||
2
tldr/ed
2
tldr/ed
@@ -35,7 +35,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Replace a string with a specific replacement for all lines:
|
||||
|
||||
`,s/{{regular_expression}}/{{replacement}}/g<Enter>`
|
||||
`,s/{{regex}}/{{replacement}}/g<Enter>`
|
||||
|
||||
- Exit `ed`:
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# egrep
|
||||
|
||||
> Find patterns in files using extended regular expression (supports `?`, `+`, `{}`, `()`, and `|`).
|
||||
> Find patterns in files using extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`).
|
||||
> More information: <https://manned.org/egrep>.
|
||||
|
||||
- Search for a pattern within a file:
|
||||
|
||||
4
tldr/ex
4
tldr/ex
@@ -25,9 +25,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`/{{search_pattern}}<Enter>`
|
||||
|
||||
- Perform a regular expression substitution in the whole file:
|
||||
- Perform a `regex` substitution in the whole file:
|
||||
|
||||
`%s/{{regular_expression}}/{{replacement}}/g<Enter>`
|
||||
`%s/{{regex}}/{{replacement}}/g<Enter>`
|
||||
|
||||
- Insert text:
|
||||
|
||||
|
||||
26
tldr/exrex
26
tldr/exrex
@@ -5,31 +5,31 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exrex
|
||||
|
||||
> Generate all/random matching strings for a regular expression.
|
||||
> It can also simplify regular expressions.
|
||||
> Generate all/random matching strings for a `regex`.
|
||||
> It can also simplify `regex`es.
|
||||
> More information: <https://github.com/asciimoo/exrex>.
|
||||
|
||||
- Generate all possible strings that match a regular expression:
|
||||
- Generate all possible strings that match a `regex`:
|
||||
|
||||
`exrex '{{regular_expression}}'`
|
||||
`exrex '{{regex}}'`
|
||||
|
||||
- Generate a random string that matches a regular expression:
|
||||
- Generate a random string that matches a `regex`:
|
||||
|
||||
`exrex --random '{{regular_expression}}'`
|
||||
`exrex --random '{{regex}}'`
|
||||
|
||||
- Generate at most 100 strings that match a regular expression:
|
||||
- Generate at most 100 strings that match a `regex`:
|
||||
|
||||
`exrex --max-number {{100}} '{{regular_expression}}'`
|
||||
`exrex --max-number {{100}} '{{regex}}'`
|
||||
|
||||
- Generate all possible strings that match a regular expression, joined by a custom delimiter string:
|
||||
- Generate all possible strings that match a `regex`, joined by a custom delimiter string:
|
||||
|
||||
`exrex --delimiter "{{, }}" '{{regular_expression}}'`
|
||||
`exrex --delimiter "{{, }}" '{{regex}}'`
|
||||
|
||||
- Print count of all possible strings that match a regular expression:
|
||||
- Print count of all possible strings that match a `regex`:
|
||||
|
||||
`exrex --count '{{regular_expression}}'`
|
||||
`exrex --count '{{regex}}'`
|
||||
|
||||
- Simplify a regular expression:
|
||||
- Simplify a `regex`:
|
||||
|
||||
`exrex --simplify '{{ab|ac}}'`
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Fetch a specific structure:
|
||||
|
||||
`fastfetch {{[-s|--structure]}} {{structure}}`
|
||||
`fastfetch {{[-s|--structure]}} {{os:kernel:de:cpu:gpu}}`
|
||||
|
||||
- Use a specific logo:
|
||||
|
||||
|
||||
12
tldr/fastmod
12
tldr/fastmod
@@ -9,15 +9,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Regexes are matched by Rust regex crate.
|
||||
> More information: <https://github.com/facebookincubator/fastmod>.
|
||||
|
||||
- Replace a regex pattern in all files of the current directory, ignoring files on .ignore and .gitignore:
|
||||
- Replace a `regex` in all files of the current directory, ignoring files on .ignore and .gitignore:
|
||||
|
||||
`fastmod {{regex_pattern}} {{replacement}}`
|
||||
`fastmod {{regex}} {{replacement}}`
|
||||
|
||||
- Replace a regex pattern in case-insensitive mode in specific files or directories:
|
||||
- Replace a `regex` in case-insensitive mode in specific files or directories:
|
||||
|
||||
`fastmod --ignore-case {{regex_pattern}} {{replacement}} -- {{path/to/file path/to/directory ...}}`
|
||||
`fastmod --ignore-case {{regex}} {{replacement}} -- {{path/to/file path/to/directory ...}}`
|
||||
|
||||
- Replace a regex pattern in a specific directory in files filtered with a case-insensitive glob pattern:
|
||||
- Replace a `regex` in a specific directory in files filtered with a case-insensitive glob pattern:
|
||||
|
||||
`fastmod {{regex}} {{replacement}} --dir {{path/to/directory}} --iglob {{'**/*.{js,json}'}}`
|
||||
|
||||
@@ -25,7 +25,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`fastmod --fixed-strings {{exact_string}} {{replacement}} --extensions {{json,js}}`
|
||||
|
||||
- Replace for an exact string without prompt for a confirmation (disables regular expressions):
|
||||
- Replace for an exact string without prompt for a confirmation (disables `regex`):
|
||||
|
||||
`fastmod --accept-all --fixed-strings {{exact_string}} {{replacement}}`
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `awk`, `ed`.
|
||||
> More information: <https://www.freebsd.org/cgi/man.cgi?sed>.
|
||||
|
||||
- Replace all `apple` (basic regex) occurrences with `mango` (basic regex) in all input lines and print the result to `stdout`:
|
||||
- Replace all `apple` (basic `regex`) occurrences with `mango` (basic `regex`) in all input lines and print the result to `stdout`:
|
||||
|
||||
`{{command}} | sed 's/apple/mango/g'`
|
||||
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`{{command}} | sed -fa {{path/to/script.sed}}`
|
||||
|
||||
- Replace all `apple` (extended regex) occurrences with `APPLE` (extended regex) in all input lines and print the result to `stdout`:
|
||||
- Replace all `apple` (extended `regex`) occurrences with `APPLE` (extended `regex`) in all input lines and print the result to `stdout`:
|
||||
|
||||
`{{command}} | sed -E 's/(apple)/\U\1/g'`
|
||||
|
||||
@@ -29,6 +29,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`{{command}} | sed -n '1p'`
|
||||
|
||||
- Replace all `apple` (basic regex) occurrences with `mango` (basic regex) in a specific file and overwrite the original file in place:
|
||||
- Replace all `apple` (basic `regex`) occurrences with `mango` (basic `regex`) in a specific file and overwrite the original file in place:
|
||||
|
||||
`sed -i 's/apple/mango/g' {{path/to/file}}`
|
||||
|
||||
2
tldr/gdu
2
tldr/gdu
@@ -24,7 +24,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`gdu --ignore-dirs {{path/to/directory1,path/to/directory2,...}}`
|
||||
|
||||
- Ignore paths by regular expression:
|
||||
- Ignore paths by `regex`:
|
||||
|
||||
`gdu --ignore-dirs-pattern '{{.*[abc]+}}'`
|
||||
|
||||
|
||||
2
tldr/gem
2
tldr/gem
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Search for remote gem(s) and show all available versions:
|
||||
|
||||
`gem search {{regular_expression}} --all`
|
||||
`gem search {{regex}} --all`
|
||||
|
||||
- Install the latest version of a gem:
|
||||
|
||||
|
||||
@@ -18,6 +18,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`git annotate {{[-e|--show-email]}} {{path/to/file}}`
|
||||
|
||||
- Print only rows that match a regular expression:
|
||||
- Print only rows that match a `regex`:
|
||||
|
||||
`git annotate -L :{{regexp}} {{path/to/file}}`
|
||||
|
||||
@@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`git fame`
|
||||
|
||||
- Exclude files/directories that match the specified regular expression:
|
||||
- Exclude files/directories that match the specified `regex`:
|
||||
|
||||
`git fame --excl "{{regular_expression}}"`
|
||||
`git fame --excl "{{regex}}"`
|
||||
|
||||
- Calculate contributions made after the specified date:
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`git sed -c '{{find_text}}' '{{replace_text}}'`
|
||||
|
||||
- Replace the specified text, using regular expressions:
|
||||
- Replace the specified text, using `regex`:
|
||||
|
||||
`git sed -f g '{{find_text}}' '{{replace_text}}'`
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# grep
|
||||
|
||||
> Find patterns in files using regular expressions.
|
||||
> Find patterns in files using `regex`es.
|
||||
> More information: <https://www.gnu.org/software/grep/manual/grep.html>.
|
||||
|
||||
- Search for a pattern within a file:
|
||||
|
||||
`grep "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
- Search for an exact string (disables regular expressions):
|
||||
- Search for an exact string (disables `regex`es):
|
||||
|
||||
`grep {{[-F|--fixed-strings]}} "{{exact_string}}" {{path/to/file}}`
|
||||
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`grep {{[-rnI|--recursive --line-number --binary-files=without-match]}} "{{search_pattern}}" {{path/to/directory}}`
|
||||
|
||||
- Use extended regular expressions (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:
|
||||
- Use extended `regex`es (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode:
|
||||
|
||||
`grep {{[-Ei|--extended-regexp --ignore-case]}} "{{search_pattern}}" {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# grex
|
||||
|
||||
> Generate regular expressions.
|
||||
> Generate `regex`s.
|
||||
> More information: <https://github.com/pemistahl/grex>.
|
||||
|
||||
- Generate a simple regular expression:
|
||||
- Generate a simple `regex`:
|
||||
|
||||
`grex {{space_separated_strings}}`
|
||||
|
||||
- Generate a case-insensitive regular expression:
|
||||
- Generate a case-insensitive `regex`:
|
||||
|
||||
`grex {{[-i|--ignore-case]}} {{space_separated_strings}}`
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`httpflow {{host httpbin.org or host baidu.com}}`
|
||||
|
||||
- Use a regular expression to filter requests by URLs:
|
||||
- Use a `regex` to filter requests by URLs:
|
||||
|
||||
`httpflow -u '{{regular_expression}}'`
|
||||
`httpflow -u '{{regex}}'`
|
||||
|
||||
- Read packets from PCAP format binary file:
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`ippfind --txt-pdl application/postscript {{[-x|--exec]}} ipptool -f onepage-letter.ps '{}' print-job.test \;`
|
||||
|
||||
- Send a PostScript test document to every PostScript printer on the network, whose name matches a regular expression:
|
||||
- Send a PostScript test document to every PostScript printer on the network, whose name matches a `regex`:
|
||||
|
||||
`ippfind --txt-pdl application/postscript {{[-h|--host]}} {{regex}} {{[-x|--exec]}} ipptool -f onepage-letter.ps '{}' print-job.test \;`
|
||||
|
||||
@@ -16,13 +16,13 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`jest {{path/to/file1 path/to/file2 ...}}`
|
||||
|
||||
- Run the test suites from files within the current and subdirectories, whose paths match the given regular expression:
|
||||
- Run the test suites from files within the current and subdirectories, whose paths match the given `regex`:
|
||||
|
||||
`jest {{regular_expression1}} {{regular_expression2}}`
|
||||
`jest {{regex1}} {{regex2}}`
|
||||
|
||||
- Run the tests whose names match the given regular expression:
|
||||
- Run the tests whose names match the given `regex`:
|
||||
|
||||
`jest --testNamePattern {{regular_expression}}`
|
||||
`jest --testNamePattern {{regex}}`
|
||||
|
||||
- Run test suites related to a given source file:
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`linkchecker --check-extern {{https://example.com/}}`
|
||||
|
||||
- Ignore URLs that match a specific regular expression:
|
||||
- Ignore URLs that match a specific `regex`:
|
||||
|
||||
`linkchecker --ignore-url {{regular_expression}} {{https://example.com/}}`
|
||||
`linkchecker --ignore-url {{regex}} {{https://example.com/}}`
|
||||
|
||||
- Output results to a CSV file:
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo aide {{[-c|--config]}} {{path/to/config_file}}`
|
||||
|
||||
- Use REGEX to limit AIDE to a specific string:
|
||||
- Use `regex` to limit AIDE to a specific string:
|
||||
|
||||
`sudo aide {{[-l|--limit]}} {{REGEX}}`
|
||||
`sudo aide {{[-l|--limit]}} {{regex}}`
|
||||
|
||||
- Send reporter results to a URL:
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`apt-file {{show|list}} {{package}}`
|
||||
|
||||
- Search for packages that match the `regular_expression`:
|
||||
- Search for packages that match the `regex`:
|
||||
|
||||
`apt-file {{search|find}} {{[-x|--regexp]}} {{regular_expression}}`
|
||||
`apt-file {{search|find}} {{[-x|--regexp]}} {{regex}}`
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Search for packages from the official repositories and AUR:
|
||||
|
||||
`aura --aursync --both --search {{keyword|regular_expression}}`
|
||||
`aura --aursync --both --search {{keyword|regex}}`
|
||||
|
||||
- Install a package from the AUR:
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Interact with Arch Linux's User Repository, commonly referred to as the AUR.
|
||||
> More information: <https://github.com/falconindy/auracle>.
|
||||
|
||||
- Display AUR packages that match a regular expression:
|
||||
- Display AUR packages that match a `regex`:
|
||||
|
||||
`auracle search '{{regular_expression}}'`
|
||||
`auracle search '{{regex}}'`
|
||||
|
||||
- Display information about one or more AUR packages:
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo btrfs {{[rest|restore]}} {{[-D|--dry-run]}} {{path/to/btrfs_device}} {{path/to/target_directory}}`
|
||||
|
||||
- Restore files matching a given regex ([c]ase-insensitive) files to be restored from a btrfs filesystem (all parent directories of target file(s) must match as well):
|
||||
- Restore files matching a given `regex` ([c]ase-insensitive) files to be restored from a btrfs filesystem (all parent directories of target file(s) must match as well):
|
||||
|
||||
`sudo btrfs {{[rest|restore]}} --path-regex {{regex}} -c {{path/to/btrfs_device}} {{path/to/target_directory}}`
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`csplit {{path/to/file}} 5 {{[-f|--prefix]}} {{prefix}}`
|
||||
|
||||
- Split a file at a line matching a regular expression:
|
||||
- Split a file at a line matching a `regex`:
|
||||
|
||||
`csplit {{path/to/file}} /{{regular_expression}}/`
|
||||
`csplit {{path/to/file}} /{{regex}}/`
|
||||
|
||||
@@ -13,7 +13,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`esearch -db pubmed -query "{{selective serotonin reuptake inhibitor}}"`
|
||||
|
||||
- Search the protein database using a query and regexp:
|
||||
- Search the protein database using a query and `regex`:
|
||||
|
||||
`esearch -db {{protein}} -query {{'Escherichia*'}}`
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Note: This page refers to the command from the `rename` Debian package.
|
||||
> More information: <https://manned.org/file-rename>.
|
||||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
- Rename files using a Perl Common `regex` (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`guix package {{[-r|--remove]}} {{package}}`
|
||||
|
||||
- Search the package database for a regular expression:
|
||||
- Search the package database for a `regex`:
|
||||
|
||||
`guix package {{[-s|--search]}} "{{search_pattern}}"`
|
||||
|
||||
|
||||
41
tldr/linux/hddtemp
Normal file
41
tldr/linux/hddtemp
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# hddtemp
|
||||
|
||||
> Display temperature of HDD via S.M.A.R.T.
|
||||
> More information: <https://manned.org/hddtemp>.
|
||||
|
||||
- Display temperature of a specific drive:
|
||||
|
||||
`hddtemp {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Display temperature of a SATA drive assigned to `sda`:
|
||||
|
||||
`hddtemp SATA:/dev/sda`
|
||||
|
||||
- Log temperatures to syslog every `n` seconds:
|
||||
|
||||
`hddtemp {{[-S|--syslog]}} {{nseconds}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Print only numeric value of temperature without unit:
|
||||
|
||||
`hddtemp {{[-n|--numeric]}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Define the unit used to denote temperature:
|
||||
|
||||
`hddtemp {{[-u|--unit]}} {{C|F}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Wake ATA drive before attempting to read temperature:
|
||||
|
||||
`hddtemp {{[-w|--wake-up]}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Enter debug mode to show S.M.A.R.T. fields and their values:
|
||||
|
||||
`hddtemp {{[-D|--debug]}} {{type}}:{{/dev/sdX}}`
|
||||
|
||||
- Suppress compatibility check for drive types:
|
||||
|
||||
`hddtemp {{[-q|--quiet]}} {{type}}:{{/dev/sdX}}`
|
||||
@@ -20,9 +20,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} {{path/to/directory}}`
|
||||
|
||||
- Watch a directory for changes, excluding files, whose names match a regular expression:
|
||||
- Watch a directory for changes, excluding files, whose names match a `regex`:
|
||||
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regular_expression}}" {{path/to/directory}}`
|
||||
`inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regex}}" {{path/to/directory}}`
|
||||
|
||||
- Watch a file for changes, exiting when no event occurs for 30 seconds:
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`logread -l {{n}}`
|
||||
|
||||
- Filter messages by (Keyword/Regular Expression):
|
||||
- Filter messages by (Keyword/`regex`):
|
||||
|
||||
`logread -e {{pattern}}`
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`mate-search-tool --start --named={{string}} --path={{path/to/directory}}`
|
||||
|
||||
- Search files with name matching a specific regular expression:
|
||||
- Search files with name matching a specific `regex`:
|
||||
|
||||
`mate-search-tool --start --regex={{string}} --path={{path/to/directory}}`
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`mksquashfs {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{filesystem.squashfs}} -wildcards -e "{{*.gz}}"`
|
||||
|
||||
- Create or append files and directories to a squashfs filesystem, [e]xcluding those matching a regular expression:
|
||||
- Create or append files and directories to a squashfs filesystem, [e]xcluding those matching a `regex`:
|
||||
|
||||
`mksquashfs {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{filesystem.squashfs}} -regex -e "{{regular_expression}}"`
|
||||
`mksquashfs {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{filesystem.squashfs}} -regex -e "{{regex}}"`
|
||||
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`nala purge {{package}}`
|
||||
|
||||
- Search package names and descriptions using a word, regex (default) or glob:
|
||||
- Search package names and descriptions using a word, `regex` (default) or glob:
|
||||
|
||||
`nala search "{{pattern}}"`
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`nl {{[-b|--body-numbering]}} {{a|n}} {{path/to/file}}`
|
||||
|
||||
- Number only the body lines that match a basic regular expression (BRE) [p]attern:
|
||||
- Number only the body lines that match a basic `regex` (BRE) [p]attern:
|
||||
|
||||
`nl {{[-b|--body-numbering]}} p'FooBar[0-9]' {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# nmcli
|
||||
|
||||
> Manage the network configuration using NetworkManager.
|
||||
> See also: `nmtui`.
|
||||
> More information: <https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/nmcli.html>.
|
||||
|
||||
- View documentation for managing network interfaces and establishing new Wi-Fi connections:
|
||||
|
||||
@@ -23,3 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Print the password and QR code for the current Wi-Fi network:
|
||||
|
||||
`nmcli {{[d|device]}} {{[w|wifi]}} {{[s|show-password]}}`
|
||||
|
||||
- Print detailed information about a device:
|
||||
|
||||
`nmcli {{[d|device]}} {{[sh|show]}} {{wlan0}}`
|
||||
|
||||
@@ -7,6 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Text user interface for controlling NetworkManager.
|
||||
> Use `<ArrowKeys>` to navigate, `<Enter>` to select an option.
|
||||
> See also: `nmcli`.
|
||||
> More information: <https://networkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/nmtui.html>.
|
||||
|
||||
- Open the user interface:
|
||||
|
||||
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo pacman -Rs {{package}}`
|
||||
|
||||
- Search ([s]) the package database for a regular expression or keyword:
|
||||
- Search ([s]) the package database for a `regex` or keyword:
|
||||
|
||||
`pacman -Ss "{{search_pattern}}"`
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`pacman -F {{filename}}`
|
||||
|
||||
- Find the package that owns a specific [F]ile, using a regular e[x]pression:
|
||||
- Find the package that owns a specific [F]ile, using a `rege[x]`:
|
||||
|
||||
`pacman -Fx '{{regular_expression}}'`
|
||||
`pacman -Fx '{{regex}}'`
|
||||
|
||||
- List only the package names:
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo pacman -Syu --noconfirm {{package}}`
|
||||
|
||||
- [s]earch the package database for a regular expression or keyword:
|
||||
- [s]earch the package database for a `regex` or keyword:
|
||||
|
||||
`pacman -Ss "{{search_pattern}}"`
|
||||
|
||||
|
||||
@@ -18,24 +18,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Access a specific container's shell:
|
||||
|
||||
`pct enter {{100}}`
|
||||
`pct {{[en|enter]}} {{100}}`
|
||||
|
||||
- Create a container from template:
|
||||
|
||||
`pct create {{100}} {{/var/lib/vz/template/cache/distro-name.tar.zst}} -hostname {{hostname}} -password {{password}} --rootfs {{local-lvm}} --on-boot`
|
||||
`pct {{[cr|create]}} {{100}} {{/var/lib/vz/template/cache/distro-name.tar.zst}} -hostname {{hostname}} -password {{password}} --rootfs {{local-lvm}} --on-boot`
|
||||
|
||||
- Resize the container's disk to 20G:
|
||||
|
||||
`pct resize {{100}} {{rootfs|mpX}} {{20G}}`
|
||||
`pct {{[resi|resize]]} {{100}} {{rootfs|mpX}} {{20G}}`
|
||||
|
||||
- Show the configuration of a container, specifying its ID:
|
||||
|
||||
`pct config {{100}}`
|
||||
`pct {{[conf|config]}} {{100}}`
|
||||
|
||||
- Snapshot a specific container with description:
|
||||
|
||||
`pct snapshot {{100}} {{my-snapshot}} --description {{My snapshot description}}`
|
||||
`pct {{[sn|snapshot]}} {{100}} {{my-snapshot}} --description {{My snapshot description}}`
|
||||
|
||||
- Destroy a container and remove all related resources:
|
||||
|
||||
`pct destroy {{100}} --purge`
|
||||
`pct {{[des|destroy]}} {{100}} --purge`
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Note: This page refers to the command from the `perl-rename` Arch Linux package.
|
||||
> More information: <https://manned.org/rename>.
|
||||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
- Rename files using a Perl Common `regex` (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Note: This page refers to the command from the `prename` Fedora package.
|
||||
> More information: <https://manned.org/prename>.
|
||||
|
||||
- Rename files using a Perl Common Regular Expression (substitute 'foo' with 'bar' wherever found):
|
||||
- Rename files using a Perl Common `regex` (substitute 'foo' with 'bar' wherever found):
|
||||
|
||||
`rename {{'s/foo/bar/'}} {{*}}`
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Using an ISO file uploaded on the local storage, create a virtual machine with a 4 GB IDE disk on the `local-lvm` storage and an ID of 100:
|
||||
|
||||
`qm create {{100}} -ide0 {{local-lvm:4}} -net0 {{e1000}} -cdrom {{local:iso/proxmox-mailgateway_2.1.iso}}`
|
||||
`qm {{[cr|create]}} {{100}} -ide0 {{local-lvm:4}} -net0 {{e1000}} -cdrom {{local:iso/proxmox-mailgateway_2.1.iso}}`
|
||||
|
||||
- Show the configuration of a virtual machine, specifying its ID:
|
||||
|
||||
`qm config {{100}}`
|
||||
`qm {{[co|config]}} {{100}}`
|
||||
|
||||
- Start a specific virtual machine:
|
||||
|
||||
@@ -27,8 +27,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Send a shutdown request, then wait until the virtual machine is stopped:
|
||||
|
||||
`qm shutdown {{100}} && qm wait {{100}}`
|
||||
`qm {{[shu|shutdown]}} {{100}} && qm {{[w|wait]}} {{100}}`
|
||||
|
||||
- Destroy a virtual machine and remove all related resources:
|
||||
|
||||
`qm destroy {{100}} --purge`
|
||||
`qm {{[des|destroy]}} {{100}} --purge`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Clean up resources:
|
||||
|
||||
`qm cleanup {{vm_id}} {{clean-shutdown}} {{guest-requested}}`
|
||||
`qm {{[cl|cleanup]}} {{vm_id}} {{clean-shutdown}} {{guest-requested}}`
|
||||
|
||||
29
tldr/linux/qm-cloudinit
Normal file
29
tldr/linux/qm-cloudinit
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# qm cloudinit
|
||||
|
||||
> Configure cloudinit settings for virtual machines managed by Proxmox Virtual Environment (PVE).
|
||||
> More information: <https://pve.proxmox.com/pve-docs/qm.1.html>.
|
||||
|
||||
- Configure cloudinit settings for a specific user and set password for the user:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -user={{user}} -password={{password}}`
|
||||
|
||||
- Configure cloudinit settings for a specific user and set password for the user with a specific SSH key:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -user={{user}} -password={{password}} -sshkey={{ssh_key}}`
|
||||
|
||||
- Set the hostname for a specific virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -hostname={{hostname}}`
|
||||
|
||||
- Configure the network interface settings for a specific virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -ipconfig {{ipconfig}}`
|
||||
|
||||
- Configure a shell script to execute before `cloud-ini` is run on a virtual machine:
|
||||
|
||||
`qm {{[clou|cloudinit]}} {{vm_id}} -pre {{script}}`
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Generate a cloudinit file for a specific configuration type:
|
||||
|
||||
`qm cloudinit dump {{virtual_machine_id}} {{meta|network|user}}`
|
||||
`qm {{[clou|cloudinit]}} dump {{virtual_machine_id}} {{meta|network|user}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display the virtual machine configuration:
|
||||
|
||||
`qm config {{vm_id}}`
|
||||
`qm {{[co|config]}} {{vm_id}}`
|
||||
|
||||
- Display the current configuration values instead of pending values for the virtual machine:
|
||||
|
||||
`qm config --current {{true}} {{vm_id}}`
|
||||
`qm {{[co|config]}} --current {{true}} {{vm_id}}`
|
||||
|
||||
- Fetch the configuration values from the given snapshot:
|
||||
|
||||
`qm config --snapshot {{snapshot_name}} {{vm_id}}`
|
||||
`qm {{[co|config]}} --snapshot {{snapshot_name}} {{vm_id}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a virtual machine:
|
||||
|
||||
`qm create {{100}}`
|
||||
`qm {{[cr|create]}} {{100}}`
|
||||
|
||||
- Automatically start the machine after creation:
|
||||
|
||||
`qm create {{100}} --start 1`
|
||||
`qm {{[cr|create]}} {{100}} --start 1`
|
||||
|
||||
- Specify the type of operating system on the machine:
|
||||
|
||||
`qm create {{100}} --ostype {{win10}}`
|
||||
`qm {{[cr|create]}} {{100}} --ostype {{win10}}`
|
||||
|
||||
- Replace an existing machine (requires archiving it):
|
||||
|
||||
`qm create {{100}} --archive {{path/to/backup_file.tar}} --force 1`
|
||||
`qm {{[cr|create]}} {{100}} --archive {{path/to/backup_file.tar}} --force 1`
|
||||
|
||||
- Specify a script that is executed automatically depending on the state of the virtual machine:
|
||||
|
||||
`qm create {{100}} --hookscript {{path/to/script.pl}}`
|
||||
`qm {{[cr|create]}} {{100}} --hookscript {{path/to/script.pl}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Delete a snapshot:
|
||||
|
||||
`qm delsnapshot {{vm_id}} {{snapshot_name}}`
|
||||
`qm {{[del|delsnapshot]}} {{vm_id}} {{snapshot_name}}`
|
||||
|
||||
- Delete a snapshot from a configuration file (even if removing the disk snapshot fails):
|
||||
|
||||
`qm delsnapshot {{vm_id}} {{snapshot_name}} --force 1`
|
||||
`qm {{[del|delsnapshot]}} {{vm_id}} {{snapshot_name}} --force 1`
|
||||
|
||||
@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Destroy a specific virtual machine:
|
||||
|
||||
`qm destroy {{vm_id}}`
|
||||
`qm {{[des|destroy]}} {{vm_id}}`
|
||||
|
||||
- Destroy all disks that are not explicitly referenced in a specific virtual machine's configuration:
|
||||
|
||||
`qm destroy {{vm_id}} --destroy-unreferenced-disks`
|
||||
`qm {{[des|destroy]}} {{vm_id}} --destroy-unreferenced-disks`
|
||||
|
||||
- Destroy a virtual machine and remove from all locations (inventory, backup jobs, high availability managers, etc.):
|
||||
|
||||
`qm destroy {{vm_id}} --purge`
|
||||
`qm {{[des|destroy]}} {{vm_id}} --purge`
|
||||
|
||||
- Destroy a specific virtual machine ignoring locks and forcing destroy:
|
||||
|
||||
`sudo qm destroy {{vm_id}} --skiplock`
|
||||
`sudo qm {{[des|destroy]}} {{vm_id}} --skiplock`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Import a VMDK/qcow2/raw disk image using a specific storage name:
|
||||
|
||||
`qm disk import {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
`qm {{[di|disk]}} import {{vm_id}} {{path/to/disk}} {{storage_name}} --format {{qcow2|raw|vmdk}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Move a virtual disk:
|
||||
|
||||
`qm disk move {{vm_id}} {{destination}} {{index}}`
|
||||
`qm {{[di|disk]}} move {{vm_id}} {{destination}} {{index}}`
|
||||
|
||||
- Delete the previous copy of the virtual disk:
|
||||
|
||||
`qm disk move -delete {{vm_id}} {{destination}} {{index}}`
|
||||
`qm {{[di|disk]}} move -delete {{vm_id}} {{destination}} {{index}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Add `n` gigabytes to a virtual disk:
|
||||
|
||||
`qm disk resize {{vm_id}} {{disk_name}} +{{n}}G`
|
||||
`qm {{[di|disk]}} resize {{vm_id}} {{disk_name}} +{{n}}G`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a specific QEMU Guest Agent command:
|
||||
|
||||
`qm guest cmd {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
`qm {{[g|guest]}} cmd {{virtual_machine_id}} {{fsfreeze-freeze|fsfreeze-status|fsfreeze-thaw|fstrim|get-fsinfo|...}}`
|
||||
|
||||
@@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a specific command via a guest agent:
|
||||
|
||||
`qm guest exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{command}} {{argument1 argument2 ...}}`
|
||||
|
||||
- Execute a specific command via a guest agent asynchronously:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --synchronous 0`
|
||||
|
||||
- Execute a specific command via a guest agent with a specified timeout of 10 seconds:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2...}} --timeout {{10}}`
|
||||
|
||||
- Execute a specific command via a guest agent and forward input from `stdin` until EOF to the guest agent:
|
||||
|
||||
`qm guest exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
`qm {{[g|guest]}} exec {{vm_id}} {{argument1 argument2 ...}} --pass-stdin 1`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print the status of a specific PID:
|
||||
|
||||
`qm guest exec-status {{vm_id}} {{pid}}`
|
||||
`qm {{[g|guest]}} exec-status {{vm_id}} {{pid}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set a password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm guest passwd {{vm_id}} {{username}}`
|
||||
`qm {{[g|guest]}} passwd {{vm_id}} {{username}}`
|
||||
|
||||
- Set an already hashed password for a specific user in a virtual machine interactively:
|
||||
|
||||
`qm guest passwd {{vm_id}} {{username}} --crypted 1`
|
||||
`qm {{[g|guest]}} passwd {{vm_id}} {{username}} --crypted 1`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help for a specific command:
|
||||
|
||||
`qm help {{command}}`
|
||||
`qm {{[h|help]}} {{command}}`
|
||||
|
||||
- Display help for a specific command with detailed information:
|
||||
|
||||
`qm help {{command}} --verbose {{true|false}}`
|
||||
`qm {{[h|help]}} {{command}} --verbose {{true|false}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all snapshots of a specific virtual machine:
|
||||
|
||||
`qm listsnapshot {{vm_id}}`
|
||||
`qm {{[lists|listsnapshot]}} {{vm_id}}`
|
||||
|
||||
@@ -11,20 +11,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Migrate a specific virtual machine:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}}`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}}`
|
||||
|
||||
- Override the current I/O bandwidth limit with 10 KiB/s:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --bwlimit 10`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --bwlimit 10`
|
||||
|
||||
- Allow migration of virtual machines using local devices (root only):
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --force true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --force true`
|
||||
|
||||
- Use online/live migration if a virtual machine is running:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --online true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --online true`
|
||||
|
||||
- Enable live storage migration for local disks:
|
||||
|
||||
`qm migrate {{vm_id}} {{target}} --with-local-disks true`
|
||||
`qm {{[mi|migrate]}} {{vm_id}} {{target}} --with-local-disks true`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enter the QEMU Monitor interface of a specific virtual machine:
|
||||
|
||||
`qm monitor {{vm_id}}`
|
||||
`qm {{[mo|monitor]}} {{vm_id}}`
|
||||
|
||||
@@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Command used by `qmigrate` during data migration from a VM to another host:
|
||||
|
||||
`qm mtunnel`
|
||||
`qm {{[mt|mtunnel]}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Stop embedded nbd server:
|
||||
|
||||
`qm nbdstop {{VM_ID}}`
|
||||
`qm {{[n|nbdstop]}} {{VM_ID}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Get the virtual machine configuration of a specific virtual machine:
|
||||
|
||||
`qm pending {{vm_id}}`
|
||||
`qm {{[p|pending]}} {{vm_id}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Reboot a virtual machine:
|
||||
|
||||
`qm reboot {{vm_id}}`
|
||||
`qm {{[reb|reboot]}} {{vm_id}}`
|
||||
|
||||
- Reboot a virtual machine after wait for at most 10 seconds:
|
||||
|
||||
`qm reboot --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[reb|reboot]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Resume a specific virtual machine:
|
||||
|
||||
`qm resume {{vm_id}}`
|
||||
`qm {{[resu|resume]}} {{vm_id}}`
|
||||
|
||||
- Resume a specific virtual machine ignoring locks (requires root):
|
||||
|
||||
`sudo qm resume {{vm_id}} --skiplock true`
|
||||
`sudo qm {{[resu|resume]}} {{vm_id}} --skiplock true`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Rollback the state of a specific VM to a specified snapshot:
|
||||
|
||||
`qm rollback {{vm_id}} {{snap_name}}`
|
||||
`qm {{[ro|rollback]}} {{vm_id}} {{snap_name}}`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Send the specified key event to a specific virtual machine:
|
||||
|
||||
`qm sendkey {{vm_id}} {{key}}`
|
||||
`qm {{[sen|sendkey]}} {{vm_id}} {{key}}`
|
||||
|
||||
- Allow root user to send key event and ignore locks:
|
||||
|
||||
`qm sendkey --skiplock {{true}} {{vm_id}} {{key}}`
|
||||
`qm {{[sen|sendkey]}} --skiplock {{true}} {{vm_id}} {{key}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Show command-line for a specific virtual machine:
|
||||
|
||||
`qm showcmd {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} {{vm_id}}`
|
||||
|
||||
- Put each option on a new line to enhance human readability:
|
||||
|
||||
`qm showcmd --pretty {{true}} {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} --pretty {{true}} {{vm_id}}`
|
||||
|
||||
- Fetch configuration values from a specific snapshot:
|
||||
|
||||
`qm showcmd --snapshot {{string}} {{vm_id}}`
|
||||
`qm {{[sho|showcmd]}} --snapshot {{string}} {{vm_id}}`
|
||||
|
||||
@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Shutdown a virtual machine:
|
||||
|
||||
`qm shutdown {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine after wait for at most 10 seconds:
|
||||
|
||||
`qm shutdown --timeout {{10}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --timeout {{10}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine and do not deactivate storage volumes:
|
||||
|
||||
`qm shutdown --keepActive {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --keepActive {{true}} {{VM_ID}}`
|
||||
|
||||
- Shutdown a virtual machine and skip lock (only root can use this option):
|
||||
|
||||
`qm shutdown --skiplock {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --skiplock {{true}} {{VM_ID}}`
|
||||
|
||||
- Stop and shutdown a virtual machine:
|
||||
|
||||
`qm shutdown --forceStop {{true}} {{VM_ID}}`
|
||||
`qm {{[shu|shutdown]}} --forceStop {{true}} {{VM_ID}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a snapshot of a specific virtual machine:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}}`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}}`
|
||||
|
||||
- Create a snapshot with a specific description:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}} --description {{description}}`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}} --description {{description}}`
|
||||
|
||||
- Create a snapshot including the vmstate:
|
||||
|
||||
`qm snapshot {{vm_id}} {{snapshot_name}} --description {{description}} --vmstate 1`
|
||||
`qm {{[sn|snapshot]}} {{vm_id}} {{snapshot_name}} --description {{description}} --vmstate 1`
|
||||
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display the status of a specific virtual machine:
|
||||
|
||||
`qm status {{vm_id}}`
|
||||
`qm {{[stat|status]}} {{vm_id}}`
|
||||
|
||||
- Display detailed status of a specific virtual machine:
|
||||
|
||||
`qm status --verbose {{true}} {{vm_id}}`
|
||||
`qm {{[stat|status]}} --verbose {{true}} {{vm_id}}`
|
||||
|
||||
@@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Suspend a virtual machine by ID:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}}`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}}`
|
||||
|
||||
- Skip the lock check when suspending the VM:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}} --skiplock`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}} --skiplock`
|
||||
|
||||
- Skip the lock check for storage when suspending the VM:
|
||||
|
||||
`qm suspend {{vm_id}} {{integer}} --skiplockstorage`
|
||||
`qm {{[su|suspend]}} {{vm_id}} {{integer}} --skiplockstorage`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a template out of a specific virtual machine:
|
||||
|
||||
`qm template {{vm_id}}`
|
||||
`qm {{[tem|template]}} {{vm_id}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Unlock a specific virtual machine:
|
||||
|
||||
`qm unlock {{vm_id}}`
|
||||
`qm {{[u|unlock]}} {{vm_id}}`
|
||||
|
||||
@@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Proxy a specific virtual machine:
|
||||
|
||||
`qm vncproxy {{vm_id}}`
|
||||
`qm {{[v|vncproxy]}} {{vm_id}}`
|
||||
|
||||
@@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Wait until the virtual machine is stopped:
|
||||
|
||||
`qm wait {{vm_id}}`
|
||||
`qm {{[w|wait]}} {{vm_id}}`
|
||||
|
||||
- Wait until the virtual machine is stopped with a 10 second timeout:
|
||||
|
||||
`qm wait --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[w|wait]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
- Send a shutdown request, then wait until the virtual machine is stopped with a 10 second timeout:
|
||||
|
||||
`qm shutdown {{vm_id}} && qm wait --timeout {{10}} {{vm_id}}`
|
||||
`qm {{[shu|shutdown]}} {{vm_id}} && qm {{[w|wait]}} --timeout {{10}} {{vm_id}}`
|
||||
|
||||
@@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`rnm -ss {{old}} -rs {{new}} {{path/to/directory}}`
|
||||
|
||||
- Use a fixed (literal) search and replace string instead of regex:
|
||||
- Use a fixed (literal) search and replace string instead of `regex`:
|
||||
|
||||
`rnm -ssf {{old}} -rs {{new}} {{path/to/files}}`
|
||||
|
||||
|
||||
@@ -9,15 +9,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `awk`, `ed`.
|
||||
> More information: <https://www.gnu.org/software/sed/manual/sed.html>.
|
||||
|
||||
- Replace `apple` with `mango` on all lines using basic regex, print to `stdout`:
|
||||
- Replace `apple` with `mango` on all lines using basic `regex`, print to `stdout`:
|
||||
|
||||
`{{command}} | sed 's/apple/mango/g'`
|
||||
|
||||
- Replace `apple` with `APPLE` on all lines using extended regex, print to `stdout`:
|
||||
- Replace `apple` with `APPLE` on all lines using extended `regex`, print to `stdout`:
|
||||
|
||||
`{{command}} | sed {{[-E|--regexp-extended]}} 's/(apple)/\U\1/g'`
|
||||
|
||||
- Use basic regex to replace `apple` with `mango` and `orange` with `lime` in-place in a file (overwriting original file):
|
||||
- Use basic `regex` to replace `apple` with `mango` and `orange` with `lime` in-place in a file (overwriting original file):
|
||||
|
||||
`sed {{[-i|--in-place]}} -e 's/apple/mango/g' -e 's/orange/lime/g' {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo semanage fcontext {{[-l|--list]}} {{[-C|--locallist]}} {{[-n|--noheading]}}`
|
||||
|
||||
- Add a user-defined rule that labels any path which matches a PCRE regex:
|
||||
- Add a user-defined rule that labels any path which matches a PCRE `regex`:
|
||||
|
||||
`sudo semanage fcontext {{[-a|--add]}} {{[-t|--type]}} {{samba_share_t}} {{'/mnt/share(/.*)?'}}`
|
||||
|
||||
- Delete a user-defined rule using its PCRE regex:
|
||||
- Delete a user-defined rule using its PCRE `regex`:
|
||||
|
||||
`sudo semanage fcontext {{[-d|--delete]}} {{'/mnt/share(/.*)?'}}`
|
||||
|
||||
|
||||
@@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`zstdcat {{archive.tar.zst}} | sqfstar {{filesystem.squashfs}} "{{*.gz}}"`
|
||||
|
||||
- Create a squashfs filesystem from a tar archive compressed with `lz4`, excluding files matching a regular expression:
|
||||
- Create a squashfs filesystem from a tar archive compressed with `lz4`, excluding files matching a `regex`:
|
||||
|
||||
`lz4cat {{archive.tar.lz4}} | sqfstar {{filesystem.squashfs}} -regex "{{regular_expression}}"`
|
||||
`lz4cat {{archive.tar.lz4}} | sqfstar {{filesystem.squashfs}} -regex "{{regex}}"`
|
||||
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`whatis --wildcard {{net*}}`
|
||||
|
||||
- Search man page descriptions with a regular expression:
|
||||
- Search man page descriptions with a `regex`:
|
||||
|
||||
`whatis --regex '{{wish[0-9]\.[0-9]}}'`
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> See also: `xbps`.
|
||||
> More information: <https://manned.org/xbps-query.1>.
|
||||
|
||||
- Search for a package in remote repositories using a regular expression or a keyword (if `--regex` is omitted):
|
||||
- Search for a package in remote repositories using a `regex` or a keyword (if `--regex` is omitted):
|
||||
|
||||
`xbps-query {{[-s|--search]}} {{regular_expression|keyword}} --repository --regex`
|
||||
`xbps-query {{[-s|--search]}} {{regex|keyword}} --repository --regex`
|
||||
|
||||
- Show information about an installed package:
|
||||
|
||||
|
||||
2
tldr/mlr
2
tldr/mlr
@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Filter lines of a compressed CSV file treating numbers as [S]trings:
|
||||
|
||||
`mlr --prepipe 'gunzip' {{[-c|--csv]}} filter {{[-S|--infer-none]}} '${{fieldName}} =~ "{{regular_expression}}"' {{example.csv.gz}}`
|
||||
`mlr --prepipe 'gunzip' {{[-c|--csv]}} filter {{[-S|--infer-none]}} '${{fieldName}} =~ "{{regex}}"' {{example.csv.gz}}`
|
||||
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run tests that match a specific `grep` pattern:
|
||||
|
||||
`mocha --grep {{regular_expression}}`
|
||||
`mocha --grep {{regex}}`
|
||||
|
||||
- Run tests on changes to JavaScript files in the current directory and once initially:
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user