From f8bee5305f91dae4445f23a9716f6da27f25c1d4 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 8 Mar 2025 00:14:59 +0000 Subject: [PATCH] Update cheatsheets --- tldr/! | 2 +- tldr/cjxl | 2 +- tldr/djxl | 2 +- tldr/fping | 6 ++--- tldr/freebsd/base64 | 10 ++++----- tldr/freebsd/look | 4 ++-- tldr/git-add | 14 ++++++------ tldr/git-annotate | 2 +- tldr/git-archive | 12 +++++----- tldr/git-blame | 2 +- tldr/git-branch | 10 ++++----- tldr/git-cherry | 2 +- tldr/git-clean | 8 +++---- tldr/git-diff-tree | 2 +- tldr/git-feature | 2 +- tldr/git-lfs | 2 +- tldr/git-log | 6 ++--- tldr/git-maintenance | 4 ++-- tldr/git-rebase | 6 ++--- tldr/git-reflog | 2 +- tldr/git-remote | 2 +- tldr/git-rev-list | 2 +- tldr/git-revert | 2 +- tldr/git-shortlog | 8 +++---- tldr/git-stash | 16 ++++++------- tldr/git-status | 18 +++++++-------- tldr/git-svn | 2 +- tldr/git-tag | 6 ++--- tldr/iotop | 12 +++++----- tldr/linux/apachectl | 37 ++++++++++++++++++++++++++++++ tldr/linux/aur | 10 ++++----- tldr/linux/cam | 8 +++---- tldr/linux/coredumpctl | 4 ++-- tldr/linux/df | 8 +++---- tldr/linux/dhcpcd | 4 ++-- tldr/linux/eu-readelf | 4 ++-- tldr/linux/fadvise | 2 +- tldr/linux/ifstat | 4 ++-- tldr/linux/inxi | 14 ++++++------ tldr/linux/ip | 16 ++++++------- tldr/linux/ip-address | 12 +++++----- tldr/linux/ip-link | 12 +++++----- tldr/linux/ip-maddress | 8 +++---- tldr/linux/ip-neighbour | 10 ++++----- tldr/linux/ip-route | 14 ++++++------ tldr/linux/ip-route-get | 12 +++++----- tldr/linux/ip-rule | 16 ++++++------- tldr/linux/iwinfo | 33 +++++++++++++++++++++++++++ tldr/linux/journalctl | 16 ++++++------- tldr/linux/kdesrc-build | 2 +- tldr/linux/kwallet-query | 6 ++--- tldr/linux/locale | 4 ++-- tldr/linux/loginctl | 2 +- tldr/linux/lsfd | 4 ++-- tldr/linux/lxc-attach | 13 +++++++++++ tldr/linux/lxc-checkconfig | 17 ++++++++++++++ tldr/linux/lxc-destroy | 13 +++++++++++ tldr/linux/lxc-info | 13 +++++++++++ tldr/linux/lxc-ls | 12 ++++++---- tldr/linux/lxc-start | 13 +++++++++++ tldr/linux/lxc-stop | 13 +++++++++++ tldr/linux/makepkg | 6 ++--- tldr/linux/mkfs | 2 +- tldr/linux/mkfs.bcachefs | 2 +- tldr/linux/netplan | 33 +++++++++++++++++++++++++++ tldr/linux/pactree | 6 ++--- tldr/linux/pihole | 26 ++++++++++----------- tldr/linux/pkgctl-repo | 2 +- tldr/linux/plasmashell | 4 ++-- tldr/linux/pveversion | 2 +- tldr/linux/pw-link | 8 +++---- tldr/linux/repo-add | 4 ++-- tldr/linux/rm | 10 ++++----- tldr/linux/sfdisk | 4 ++-- tldr/linux/speaker-test | 6 ++--- tldr/linux/swaplabel | 4 ++-- tldr/linux/uname | 16 ++++++------- tldr/linux/usbip | 8 +++---- tldr/linux/v4l2-ctl | 12 +++++----- tldr/linux/wall | 4 ++-- tldr/linux/wol | 2 +- tldr/linux/xrandr | 4 ++-- tldr/mail | 6 ++--- tldr/mariadb-install-db | 2 +- tldr/mkdir | 4 ++-- tldr/mv | 20 ++++++++--------- tldr/mysql_secure_installation | 2 +- tldr/nice | 2 +- tldr/npm | 8 +++---- tldr/npm-install | 2 +- tldr/osx/base64 | 10 ++++----- tldr/osx/caffeinate | 4 ++-- tldr/osx/gcrane-completion | 2 +- tldr/osx/look | 4 ++-- tldr/osx/nettop | 2 +- tldr/osx/pbcopy | 2 +- tldr/osx/pbpaste | 2 +- tldr/osx/tail | 4 ++-- tldr/osx/top | 2 +- tldr/passwd | 4 ++-- tldr/rsync | 14 ++++++------ tldr/set | 4 ++-- tldr/snmpdf | 2 +- tldr/snmpgetnext | 4 ++-- tldr/snmpset | 2 +- tldr/snmpstatus | 2 +- tldr/snmptable | 2 +- tldr/snmptest | 2 +- tldr/wezterm | 41 ++++++++++++++++++++++++++++++++++ tldr/windows/gcrane-completion | 2 +- tldr/zoxide | 4 ++-- 111 files changed, 540 insertions(+), 310 deletions(-) create mode 100644 tldr/linux/apachectl create mode 100644 tldr/linux/iwinfo create mode 100644 tldr/linux/lxc-attach create mode 100644 tldr/linux/lxc-checkconfig create mode 100644 tldr/linux/lxc-destroy create mode 100644 tldr/linux/lxc-info create mode 100644 tldr/linux/lxc-start create mode 100644 tldr/linux/lxc-stop create mode 100644 tldr/linux/netplan create mode 100644 tldr/wezterm diff --git a/tldr/! b/tldr/! index a9ddefff..c8b441c2 100644 --- a/tldr/! +++ b/tldr/! @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # Exclamation mark -> Bash builtin to substitute with a command found in history. +> Reuse and expand the shell history in `sh`, Bash, Zsh, `rbash` and `ksh`. > More information: . - Substitute with the previous command and run it with `sudo`: diff --git a/tldr/cjxl b/tldr/cjxl index 622bfb3d..f756b991 100644 --- a/tldr/cjxl +++ b/tldr/cjxl @@ -19,4 +19,4 @@ source: https://github.com/tldr-pages/tldr.git - Display an extremely detailed help page: -`cjxl --help --verbose --verbose --verbose --verbose` +`cjxl {{[-h -v -v -v -v|--help --verbose --verbose --verbose --verbose]}}` diff --git a/tldr/djxl b/tldr/djxl index d800abf3..562e6226 100644 --- a/tldr/djxl +++ b/tldr/djxl @@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git - Display an extremely detailed help page: -`djxl --help --verbose --verbose --verbose --verbose` +`djxl {{[-h -v -v -v -v|--help --verbose --verbose --verbose --verbose]}}` diff --git a/tldr/fping b/tldr/fping index d637ef35..3acbef04 100644 --- a/tldr/fping +++ b/tldr/fping @@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git - List alive hosts within a subnet generated from a netmask: -`fping {{-a|--alive}} {{-g|--generate}} {{192.168.1.0/24}}` +`fping {{[-a|--alive]}} {{[-g|--generate]}} {{192.168.1.0/24}}` - List alive hosts within a subnet generated from an IP range and prune per-probe results: -`fping {{-q|--quiet}} {{-a|--alive}} {{-g|--generate}} {{192.168.1.1}} {{192.168.1.254}}` +`fping {{[-q|--quiet]}} {{[-a|--alive]}} {{[-g|--generate]}} {{192.168.1.1}} {{192.168.1.254}}` - List unreachable hosts within a subnet generated from a netmask: -`fping {{-u|--unreach}} {{-g|--generate}} {{192.168.1.0/24}}` +`fping {{[-u|--unreach]}} {{[-g|--generate]}} {{192.168.1.0/24}}` diff --git a/tldr/freebsd/base64 b/tldr/freebsd/base64 index 67622d0b..bf587e7e 100644 --- a/tldr/freebsd/base64 +++ b/tldr/freebsd/base64 @@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git - Encode a file to `stdout`: -`base64 {{-i|--input}} {{path/to/file}}` +`base64 {{[-i|--input]}} {{path/to/file}}` - Encode a file to the specified output file: -`base64 {{-i|--input}} {{path/to/input_file}} {{-o|--output}} {{path/to/output_file}}` +`base64 {{[-i|--input]}} {{path/to/input_file}} {{[-o|--output]}} {{path/to/output_file}}` - Wrap encoded output at a specific width (`0` disables wrapping): -`base64 {{-b|--break}} {{0|76|...}} {{path/to/file}}` +`base64 {{[-b|--break]}} {{0|76|...}} {{path/to/file}}` - Decode a file to `stdout`: -`base64 {{-d|--decode}} {{-i|--input}} {{path/to/file}}` +`base64 {{[-d|--decode]}} {{[-i|--input]}} {{path/to/file}}` - Encode from `stdin` to `stdout`: @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Decode from `stdin` to `stdout`: -`{{command}} | base64 {{-d|--decode}}` +`{{command}} | base64 {{[-d|--decode]}}` diff --git a/tldr/freebsd/look b/tldr/freebsd/look index ab17e795..ac05e1e9 100644 --- a/tldr/freebsd/look +++ b/tldr/freebsd/look @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Case-insensitively search only on alphanumeric characters: -`look {{-f|--ignore-case}} {{-d|--alphanum}} {{prefix}} {{path/to/file}}` +`look {{[-f|--ignore-case]}} {{[-d|--alphanum]}} {{prefix}} {{path/to/file}}` - Specify a string termination character (space by default): -`look {{-t|--terminate}} {{,}}` +`look {{[-t|--terminate]}} {{,}}` - Search in `/usr/share/dict/words` (`--ignore-case` and `--alphanum` are assumed): diff --git a/tldr/git-add b/tldr/git-add index eb054430..a544d116 100644 --- a/tldr/git-add +++ b/tldr/git-add @@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git - Add all files (tracked and untracked): -`git add {{-A|--all}}` +`git add {{[-A|--all]}}` -- Add all files in the current folder: +- Add all files recursively starting from the current folder: `git add .` - Only add already tracked files: -`git add {{-u|--update}}` +`git add {{[-u|--update]}}` - Also add ignored files: -`git add {{-f|--force}}` +`git add {{[-f|--force]}}` - Interactively stage parts of files: -`git add {{-p|--patch}}` +`git add {{[-p|--patch]}}` - Interactively stage parts of a given file: -`git add {{-p|--patch}} {{path/to/file}}` +`git add {{[-p|--patch]}} {{path/to/file}}` - Interactively stage a file: -`git add {{-i|--interactive}}` +`git add {{[-i|--interactive]}}` diff --git a/tldr/git-annotate b/tldr/git-annotate index bde7c181..edd37c04 100644 --- a/tldr/git-annotate +++ b/tldr/git-annotate @@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git - Print a file with the author email and commit hash prepended to each line: -`git annotate {{-e|--show-email}} {{path/to/file}}` +`git annotate {{[-e|--show-email]}} {{path/to/file}}` - Print only rows that match a regular expression: diff --git a/tldr/git-archive b/tldr/git-archive index ce6b928c..636ccb80 100644 --- a/tldr/git-archive +++ b/tldr/git-archive @@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git - Create a tar archive from the contents of the current HEAD and print it to `stdout`: -`git archive {{-v|--verbose}} HEAD` +`git archive {{[-v|--verbose]}} HEAD` - Use the Zip format and report progress verbosely: -`git archive {{-v|--verbose}} --format zip HEAD` +`git archive {{[-v|--verbose]}} --format zip HEAD` - Output the Zip archive to a specific file: -`git archive {{-v|--verbose}} {{-o|--output}} {{path/to/file.zip}} HEAD` +`git archive {{[-v|--verbose]}} {{[-o|--output]}} {{path/to/file.zip}} HEAD` - Create a tar archive from the contents of the latest commit of a specific branch: -`git archive {{-o|--output}} {{path/to/file.tar}} {{branch_name}}` +`git archive {{[-o|--output]}} {{path/to/file.tar}} {{branch_name}}` - Use the contents of a specific directory: -`git archive {{-o|--output}} {{path/to/file.tar}} HEAD:{{path/to/directory}}` +`git archive {{[-o|--output]}} {{path/to/file.tar}} HEAD:{{path/to/directory}}` - Prepend a path to each file to archive it inside a specific directory: -`git archive {{-o|--output}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD` +`git archive {{[-o|--output]}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD` diff --git a/tldr/git-blame b/tldr/git-blame index 503179f5..033074aa 100644 --- a/tldr/git-blame +++ b/tldr/git-blame @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Print file with author email and commit hash on each line: -`git blame {{-e|--show-email}} {{path/to/file}}` +`git blame {{[-e|--show-email]}} {{path/to/file}}` - Print file with author name and commit hash on each line at a specific commit: diff --git a/tldr/git-branch b/tldr/git-branch index c884e4c3..4631a6e7 100644 --- a/tldr/git-branch +++ b/tldr/git-branch @@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git - List all branches (local and remote; the current branch is highlighted by `*`): -`git branch --all` +`git branch {{[-a|--all]}}` - List which branches include a specific Git commit in their history: -`git branch --all --contains {{commit_hash}}` +`git branch {{[-a|--all]}} --contains {{commit_hash}}` - Show the name of the current branch: @@ -30,12 +30,12 @@ source: https://github.com/tldr-pages/tldr.git - Rename a branch (you must switch to a different branch before doing this): -`git branch {{-m|--move}} {{old_branch_name}} {{new_branch_name}}` +`git branch {{[-m|--move]}} {{old_branch_name}} {{new_branch_name}}` - Delete a local branch (you must switch to a different branch before doing this): -`git branch {{-d|--delete}} {{branch_name}}` +`git branch {{[-d|--delete]}} {{branch_name}}` - Delete a remote branch: -`git push {{remote_name}} --delete {{remote_branch_name}}` +`git push {{remote_name}} {{[-d|--delete]}} {{remote_branch_name}}` diff --git a/tldr/git-cherry b/tldr/git-cherry index 9c93d7ae..cae16c0f 100644 --- a/tldr/git-cherry +++ b/tldr/git-cherry @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Show commits (and their messages) with equivalent commits upstream: -`git cherry {{-v|--verbose}}` +`git cherry {{[-v|--verbose]}}` - Specify a different upstream and topic branch: diff --git a/tldr/git-clean b/tldr/git-clean index 8877640d..651653e7 100644 --- a/tldr/git-clean +++ b/tldr/git-clean @@ -14,19 +14,19 @@ source: https://github.com/tldr-pages/tldr.git - Interactively delete untracked files: -`git clean {{-i|--interactive}}` +`git clean {{[-i|--interactive]}}` - Show which files would be deleted without actually deleting them: -`git clean --dry-run` +`git clean {{[-n|--dry-run]}}` - Forcefully delete untracked files: -`git clean {{-f|--force}}` +`git clean {{[-f|--force]}}` - Forcefully delete untracked [d]irectories: -`git clean {{-f|--force}} -d` +`git clean {{[-f|--force]}} -d` - Delete untracked files, including e[x]cluded files (files ignored in `.gitignore` and `.git/info/exclude`): diff --git a/tldr/git-diff-tree b/tldr/git-diff-tree index a4b4e721..ccda1280 100644 --- a/tldr/git-diff-tree +++ b/tldr/git-diff-tree @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Display changes in patch format: -`git diff-tree {{-p|--patch}} {{tree-ish1}} {{tree-ish2}}` +`git diff-tree {{[-p|--patch]}} {{tree-ish1}} {{tree-ish2}}` - Filter changes by a specific path: diff --git a/tldr/git-feature b/tldr/git-feature index 90d63a51..6a30fa97 100644 --- a/tldr/git-feature +++ b/tldr/git-feature @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # git feature > Create or merge feature branches. -> Feature branches obey the format feature/. +> Feature branches obey the format feature/name. > More information: . - Create and switch to a new feature branch: diff --git a/tldr/git-lfs b/tldr/git-lfs index 1e09d5d3..c9b41070 100644 --- a/tldr/git-lfs +++ b/tldr/git-lfs @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Change the Git LFS endpoint URL (useful if the LFS server is separate from the Git server): -`git config {{-f|--file}} .lfsconfig lfs.url {{lfs_endpoint_url}}` +`git config {{[-f|--file]}} .lfsconfig lfs.url {{lfs_endpoint_url}}` - List tracked patterns: diff --git a/tldr/git-log b/tldr/git-log index 0292a9b4..172cf8af 100644 --- a/tldr/git-log +++ b/tldr/git-log @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Show the history of a particular file or directory, including differences: -`git log {{-p|-u|--patch}} {{path/to/file_or_directory}}` +`git log {{[-p|--patch]}} {{path/to/file_or_directory}}` - Show an overview of which file(s) changed in each commit: @@ -30,11 +30,11 @@ source: https://github.com/tldr-pages/tldr.git - Show only commits with messages that include a specific string, ignoring case: -`git log {{-i|--regexp-ignore-case}} --grep {{search_string}}` +`git log {{[-i|--regexp-ignore-case]}} --grep {{search_string}}` - Show the last N number of commits from a certain author: -`git log {{-n|--max-count}} {{number}} --author "{{author}}"` +`git log {{[-n|--max-count]}} {{number}} --author "{{author}}"` - Show commits between two dates (yyyy-mm-dd): diff --git a/tldr/git-maintenance b/tldr/git-maintenance index 7f79d25f..e7ee775b 100644 --- a/tldr/git-maintenance +++ b/tldr/git-maintenance @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `git maintenance register` -- Schedule maintenance tasks on the current repository every hour: +- Schedule maintenance tasks to run on the current repository every hour: `git maintenance start` @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Run a specific maintenance task on the current repository: -`git maintenance run --task={{commit-graph|gc|incremental-repack|loose-objects|pack-refs|prefetch}}` +`git maintenance run --task {{commit-graph|gc|incremental-repack|loose-objects|pack-refs|prefetch}}` diff --git a/tldr/git-rebase b/tldr/git-rebase index bca19ff5..0bb50f45 100644 --- a/tldr/git-rebase +++ b/tldr/git-rebase @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Start an interactive rebase, which allows the commits to be reordered, omitted, combined or modified: -`git rebase {{-i|--interactive}} {{target_base_branch_or_commit_hash}}` +`git rebase {{[-i|--interactive]}} {{target_base_branch_or_commit_hash}}` - Continue a rebase that was interrupted by a merge failure, after editing conflicting files: @@ -35,8 +35,8 @@ source: https://github.com/tldr-pages/tldr.git - Reapply the last 5 commits in-place, stopping to allow them to be reordered, omitted, combined or modified: -`git rebase {{-i|--interactive}} {{HEAD~5}}` +`git rebase {{[-i|--interactive]}} {{HEAD~5}}` - Auto-resolve any conflicts by favoring the working branch version (`theirs` keyword has reversed meaning in this case): -`git rebase {{-X|--strategy-option}} theirs {{branch_name}}` +`git rebase {{[-X|--strategy-option]}} theirs {{branch_name}}` diff --git a/tldr/git-reflog b/tldr/git-reflog index 273aa4d9..565cda1c 100644 --- a/tldr/git-reflog +++ b/tldr/git-reflog @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Show only the 5 latest entries in the reflog: -`git reflog {{-n|--max-count}} 5` +`git reflog {{[-n|--max-count]}} 5` diff --git a/tldr/git-remote b/tldr/git-remote index bda17133..7bea08b6 100644 --- a/tldr/git-remote +++ b/tldr/git-remote @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - List existing remotes with their names and URLs: -`git remote {{-v|--verbose}}` +`git remote {{[-v|--verbose]}}` - Show information about a remote: diff --git a/tldr/git-rev-list b/tldr/git-rev-list index 4186e9d1..6348827d 100644 --- a/tldr/git-rev-list +++ b/tldr/git-rev-list @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Print the latest commit that changed (add/edit/remove) a specific file on the current branch: -`git rev-list {{-n|--max-count}} 1 HEAD -- {{path/to/file}}` +`git rev-list {{[-n|--max-count]}} 1 HEAD -- {{path/to/file}}` - List commits more recent than a specific date, on a specific branch: diff --git a/tldr/git-revert b/tldr/git-revert index 1fa02e5b..ae6a9066 100644 --- a/tldr/git-revert +++ b/tldr/git-revert @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Don't create new commits, just change the working tree: -`git revert {{-n|--no-commit}} {{0c01a9..9a1743}}` +`git revert {{[-n|--no-commit]}} {{0c01a9..9a1743}}` - Cancel a Git revert after a merge conflict: diff --git a/tldr/git-shortlog b/tldr/git-shortlog index d1b9d3e4..9b44f2a7 100644 --- a/tldr/git-shortlog +++ b/tldr/git-shortlog @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - View a summary of all the commits made, sorted by the number of commits made: -`git shortlog {{-n|--numbered}}` +`git shortlog {{[-n|--numbered]}}` - View a summary of all the commits made, grouped by the committer identities (name and email): -`git shortlog {{-c|--committer}}` +`git shortlog {{[-c|--committer]}}` - View a summary of the last 5 commits (i.e. specify a revision range): @@ -26,8 +26,8 @@ source: https://github.com/tldr-pages/tldr.git - View all users, emails and the number of commits in the current branch: -`git shortlog {{-s|--summary}} {{-n|--numbered}} {{-e|--email}}` +`git shortlog {{[-s|--summary]}} {{[-n|--numbered]}} {{[-e|--email]}}` - View all users, emails and the number of commits in all branches: -`git shortlog {{-s|--summary}} {{-n|--numbered}} {{-e|--email}} --all` +`git shortlog {{[-s|--summary]}} {{[-n|--numbered]}} {{[-e|--email]}} --all` diff --git a/tldr/git-stash b/tldr/git-stash index 9a4ae233..eae2d00d 100644 --- a/tldr/git-stash +++ b/tldr/git-stash @@ -8,25 +8,25 @@ source: https://github.com/tldr-pages/tldr.git > Stash local Git changes in a temporary area. > More information: . -- Stash current changes with a [m]essage, except new (untracked) files: +- Stash current changes with a message, except new (untracked) files: -`git stash push --message {{optional_stash_message}}` +`git stash push {{[-m|--message]}} {{optional_stash_message}}` -- Stash current changes, including new ([u]ntracked) files: +- Stash current changes, including new untracked files: -`git stash --include-untracked` +`git stash {{[-u|--include-untracked]}}` -- Interactively select [p]arts of changed files for stashing: +- Interactively select parts of changed files for stashing: -`git stash --patch` +`git stash {{[-p|--patch]}}` - List all stashes (shows stash name, related branch and message): `git stash list` -- Show the changes as a [p]atch between the stash (default is `stash@{0}`) and the commit back when stash entry was first created: +- Show the changes as a patch between the stash (default is `stash@{0}`) and the commit back when stash entry was first created: -`git stash show --patch {{stash@{0}}}` +`git stash show {{[-p|--patch]}} {{stash@{0}}}` - Apply a stash (default is the latest, named stash@{0}): diff --git a/tldr/git-status b/tldr/git-status index 5a415e05..4565327b 100644 --- a/tldr/git-status +++ b/tldr/git-status @@ -13,21 +13,21 @@ source: https://github.com/tldr-pages/tldr.git `git status` -- Give output in [s]hort format: +- Give output in short format: -`git status --short` +`git status {{[-s|--short]}}` -- Show [v]erbose information on changes in both the staging area and working directory: +- Show verbose information on changes in both the staging area and working directory: -`git status --verbose --verbose` +`git status {{[-vv|--verbose --verbose]}}` -- Show the [b]ranch and tracking info: +- Show the branch and tracking info: -`git status --branch` +`git status {{[-b|--branch]}}` -- Show output in [s]hort format along with [b]ranch info: +- Show output in short format along with branch info: -`git status --short --branch` +`git status {{[-sb|--short --branch]}}` - Show the number of entries currently stashed away: @@ -35,4 +35,4 @@ source: https://github.com/tldr-pages/tldr.git - Don't show untracked files in the output: -`git status --untracked-files=no` +`git status {{[-uno|--untracked-files=no]}}` diff --git a/tldr/git-svn b/tldr/git-svn index 87ab76cb..a8b1709e 100644 --- a/tldr/git-svn +++ b/tldr/git-svn @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Clone an SVN repository starting at a given revision number: -`git svn clone {{-r|--revision}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` +`git svn clone {{[-r|--revision]}} {{1234}}:HEAD {{https://svn.example.net/subversion/repo}} {{local_dir}}` - Update local clone from the remote SVN repository: diff --git a/tldr/git-tag b/tldr/git-tag index b281f54b..af1c0088 100644 --- a/tldr/git-tag +++ b/tldr/git-tag @@ -23,15 +23,15 @@ source: https://github.com/tldr-pages/tldr.git - Create an annotated tag with the given message: -`git tag {{tag_name}} -m {{tag_message}}` +`git tag {{tag_name}} {{[-m|--message]}} {{tag_message}}` - Delete the tag with the given name: -`git tag {{-d|--delete}} {{tag_name}}` +`git tag {{[-d|--delete]}} {{tag_name}}` - Get updated tags from remote: -`git fetch --tags` +`git fetch {{[-t|--tags]}}` - Push a tag to remote: diff --git a/tldr/iotop b/tldr/iotop index a517c0da..544cc606 100644 --- a/tldr/iotop +++ b/tldr/iotop @@ -14,24 +14,24 @@ source: https://github.com/tldr-pages/tldr.git - Show only processes or threads actually doing I/O: -`sudo iotop --only` +`sudo iotop {{[-o|--only]}}` - Show I/O usage in non-interactive mode: -`sudo iotop --batch` +`sudo iotop {{[-b|--batch]}}` - Show only I/O usage of processes (default is to show all threads): -`sudo iotop --processes` +`sudo iotop {{[-P|--processes]}}` - Show I/O usage of given PID(s): -`sudo iotop --pid={{PID}}` +`sudo iotop {{[-p|--pid]}} {{PID}}` - Show I/O usage of a given user: -`sudo iotop --user={{user}}` +`sudo iotop {{[-u|--user]}} {{user}}` - Show accumulated I/O instead of bandwidth: -`sudo iotop --accumulated` +`sudo iotop {{[-a|--accumulated]}}` diff --git a/tldr/linux/apachectl b/tldr/linux/apachectl new file mode 100644 index 00000000..94bb76d7 --- /dev/null +++ b/tldr/linux/apachectl @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# apachectl + +> Control an Apache HTTP server. +> More information: . + +- Start the server: + +`sudo apachectl start` + +- Restart the server: + +`sudo apachectl restart` + +- Stop the server: + +`sudo apachectl stop` + +- Test configuration file validity: + +`apachectl configtest` + +- Check server status (requires the lynx browser): + +`apachectl status` + +- Reload configuration without dropping connections: + +`sudo apachectl graceful` + +- Print full Apache configuration: + +`apachectl -S` diff --git a/tldr/linux/aur b/tldr/linux/aur index 948e12c4..e28e20cf 100644 --- a/tldr/linux/aur +++ b/tldr/linux/aur @@ -17,14 +17,14 @@ source: https://github.com/tldr-pages/tldr.git `aur sync {{package}}` -- [l]ist packages available in your local repository: +- List packages available in your local repository: -`aur repo --list` +`aur repo {{[-l|--list]}}` -- [u]pgrade local repository packages: +- Upgrade local repository packages: -`aur sync --upgrades` +`aur sync {{[-u|--upgrades]}}` - Install a package without viewing changes in Vim and do not confirm dependency installation: -`aur sync --noview --noconfirm {{package}}` +`aur sync --noview {{[-n|--noconfirm]}} {{package}}` diff --git a/tldr/linux/cam b/tldr/linux/cam index 0df3af91..6114f377 100644 --- a/tldr/linux/cam +++ b/tldr/linux/cam @@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git - List available cameras: -`cam --list` +`cam {{[-l|--list]}}` - List controls of a camera: -`cam --camera {{camera_index}} --list-controls` +`cam {{[-c|--camera]}} {{camera_index}} --list-controls` - Write frames to a folder: -`cam --camera {{camera_index}} --capture={{frames_to_capture}} --file` +`cam {{[-c|--camera]}} {{camera_index}} {{[-C|--capture=]}}{{frames_to_capture}} {{[-F|--file]}}` - Display camera feed in a window: -`cam --camera {{camera_index}} --capture --sdl` +`cam {{[-c|--camera]}} {{camera_index}} {{[-C|--capture]}} {{[-S|--sdl]}}` diff --git a/tldr/linux/coredumpctl b/tldr/linux/coredumpctl index 4d217237..ac6c1427 100644 --- a/tldr/linux/coredumpctl +++ b/tldr/linux/coredumpctl @@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git - Extract the last core dump of a program to a file: -`coredumpctl --output={{path/to/file}} dump {{program}}` +`coredumpctl --output {{path/to/file}} dump {{program}}` - Skip debuginfod and pagination prompts and then print the backtrace when using `gdb`: -`coredumpctl debug --debugger-arguments="-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"` +`coredumpctl debug --debugger-arguments "-iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt"` diff --git a/tldr/linux/df b/tldr/linux/df index eb45631d..dc0632b1 100644 --- a/tldr/linux/df +++ b/tldr/linux/df @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Display all filesystems and their disk usage in human-readable form: -`df {{-h|--human-readable}}` +`df {{[-h|--human-readable]}}` - Display the filesystem and its disk usage containing the given file or directory: @@ -22,12 +22,12 @@ source: https://github.com/tldr-pages/tldr.git - Include statistics on the number of free inodes: -`df {{-i|--inodes}}` +`df {{[-i|--inodes]}}` - Display filesystems but exclude the specified types: -`df {{-x|--exclude-type}} {{squashfs}} {{-x|--exclude-type}} {{tmpfs}}` +`df {{[-x|--exclude-type]}} {{squashfs}} {{[-x|--exclude-type]}} {{tmpfs}}` - Display filesystem types: -`df {{-T|--print-type}}` +`df {{[-T|--print-type]}}` diff --git a/tldr/linux/dhcpcd b/tldr/linux/dhcpcd index 7cf5eb0e..07912832 100644 --- a/tldr/linux/dhcpcd +++ b/tldr/linux/dhcpcd @@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git - Release all address leases: -`sudo dhcpcd --release` +`sudo dhcpcd {{[-k|--release]}}` - Request the DHCP server for new leases: -`sudo dhcpcd --rebind` +`sudo dhcpcd {{[-n|--rebind]}}` diff --git a/tldr/linux/eu-readelf b/tldr/linux/eu-readelf index 46684c9d..fe5e620d 100644 --- a/tldr/linux/eu-readelf +++ b/tldr/linux/eu-readelf @@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git - Display all extractable information contained in the ELF file: -`eu-readelf --all {{path/to/file}}` +`eu-readelf {{[-a|--all]}} {{path/to/file}}` - Display the contents of all NOTE segments/sections, or of a particular segment/section: -`eu-readelf --notes[={{.note.ABI-tag}}] {{path/to/file}}` +`eu-readelf {{[-n--notes]}} {{.note.ABI-tag}} {{path/to/file}}` diff --git a/tldr/linux/fadvise b/tldr/linux/fadvise index 06c00f24..ef9cbe25 100644 --- a/tldr/linux/fadvise +++ b/tldr/linux/fadvise @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Preload a file into cache: -`fadvise {{-a|--advice}} willneed {{path/to/file}}` +`fadvise {{[-a|--advice]}} willneed {{path/to/file}}` - Suggest dropping a file from cache: diff --git a/tldr/linux/ifstat b/tldr/linux/ifstat index 1c2f3187..4c271472 100644 --- a/tldr/linux/ifstat +++ b/tldr/linux/ifstat @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - View network interface statistics since last boot: -`ifstat {{-a|--ignore}}` +`ifstat {{[-a|--ignore]}}` - View error rate: -`ifstat {{-e|--errors}}` +`ifstat {{[-e|--errors]}}` diff --git a/tldr/linux/inxi b/tldr/linux/inxi index 3c47f4ec..45d34d8d 100644 --- a/tldr/linux/inxi +++ b/tldr/linux/inxi @@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git - Print a full description of CPU, memory, disk, network, and process information and filter sensitive information: -`inxi --expanded --filter` +`inxi {{[-ez|--expanded --filter]}}` - Print a summary of CPU information: -`inxi --cpu` +`inxi {{[-C|--cpu]}}` - Print a summary of graphics information: -`inxi --graphics` +`inxi {{[-G|--graphics]}}` - Print a summary of system RAM: -`inxi --memory` +`inxi {{[-m|--memory]}}` - Print a summary of system audio: -`inxi --audio` +`inxi {{[-A|--audio]}}` - Print available sensor data: -`inxi --sensors` +`inxi {{[-s|--sensors]}}` - Print information about the distribution's repositories: -`inxi --repos` +`inxi {{[-r|--repos]}}` diff --git a/tldr/linux/ip b/tldr/linux/ip index 665881c2..6a6a55ff 100644 --- a/tldr/linux/ip +++ b/tldr/linux/ip @@ -11,32 +11,32 @@ source: https://github.com/tldr-pages/tldr.git - List interfaces with detailed info: -`ip address` +`ip {{[a|address]}}` - List interfaces with brief network layer info: -`ip -brief address` +`ip {{[-br a|-brief address]}}` - List interfaces with brief link layer info: -`ip -brief link` +`ip {{[-br l|-brief link]}}` - Display the routing table: -`ip route` +`ip {{[r|route]}}` - Show neighbors (ARP table): -`ip neighbour` +`ip {{[n|neighbour]}}` - Make an interface up/down: -`ip link set {{interface}} {{up|down}}` +`ip {{[l|link]}} set {{interface}} {{up|down}}` - Add/Delete an IP address to an interface: -`ip addr add/del {{ip}}/{{mask}} dev {{interface}}` +`ip {{[a|address]}} add/del {{ip}}/{{mask}} dev {{interface}}` - Add a default route: -`ip route add default via {{ip}} dev {{interface}}` +`ip {{[r|route]}} add default via {{ip}} dev {{interface}}` diff --git a/tldr/linux/ip-address b/tldr/linux/ip-address index 994b0539..f96fc327 100644 --- a/tldr/linux/ip-address +++ b/tldr/linux/ip-address @@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git - List network interfaces and their associated IP addresses: -`ip address` +`ip {{[a|address]}}` - Filter to show only active network interfaces: -`ip address show up` +`ip {{[a|address]}} show up` - Display information about a specific network interface: -`ip address show dev {{eth0}}` +`ip {{[a|address]}} show dev {{eth0}}` - Add an IP address to a network interface: -`ip address add {{ip_address}} dev {{eth0}}` +`ip {{[a|address]}} add {{ip_address}} dev {{eth0}}` - Remove an IP address from a network interface: -`ip address delete {{ip_address}} dev {{eth0}}` +`ip {{[a|address]}} delete {{ip_address}} dev {{eth0}}` - Delete all IP addresses in a given scope from a network interface: -`ip address flush dev {{eth0}} scope {{global|host|link}}` +`ip {{[a|address]}} flush dev {{eth0}} scope {{global|host|link}}` diff --git a/tldr/linux/ip-link b/tldr/linux/ip-link index a41b4009..ea07ed7c 100644 --- a/tldr/linux/ip-link +++ b/tldr/linux/ip-link @@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git - Show information about all network interfaces: -`ip link` +`ip {{[l|link]}}` - Show information about a specific network interface: -`ip link show {{ethN}}` +`ip {{[l|link]}} show {{ethN}}` - Bring a network interface up or down: -`ip link set {{ethN}} {{up|down}}` +`ip {{[l|link]}} set {{ethN}} {{up|down}}` - Give a meaningful name to a network interface: -`ip link set {{ethN}} alias "{{LAN Interface}}"` +`ip {{[l|link]}} set {{ethN}} alias "{{LAN Interface}}"` - Change the MAC address of a network interface: -`ip link set {{ethN}} address {{ff:ff:ff:ff:ff:ff}}` +`ip {{[l|link]}} set {{ethN}} address {{ff:ff:ff:ff:ff:ff}}` - Change the MTU size for a network interface to use jumbo frames: -`ip link set {{ethN}} mtu {{9000}}` +`ip {{[l|link]}} set {{ethN}} mtu {{9000}}` diff --git a/tldr/linux/ip-maddress b/tldr/linux/ip-maddress index 837755d3..4f525fdf 100644 --- a/tldr/linux/ip-maddress +++ b/tldr/linux/ip-maddress @@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git - List multicast addresses and how many programs are subscribed to them: -`ip maddress` +`ip {{[m|maddress]}}` - List device specific addresses: -`ip maddress show dev {{eth0}}` +`ip {{[m|maddress]}} show dev {{eth0}}` - Join a multicast group statically: -`sudo ip maddress add {{33:33:00:00:00:02}} dev {{eth0}}` +`sudo ip {{[m|maddress]}} add {{33:33:00:00:00:02}} dev {{eth0}}` - Leave a static multicast group: -`sudo ip maddress delete {{33:33:00:00:00:02}} dev {{eth0}}` +`sudo ip {{[m|maddress]}} delete {{33:33:00:00:00:02}} dev {{eth0}}` diff --git a/tldr/linux/ip-neighbour b/tldr/linux/ip-neighbour index cfdb88d5..5f7d2877 100644 --- a/tldr/linux/ip-neighbour +++ b/tldr/linux/ip-neighbour @@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git - Display the neighbour/ARP table entries: -`ip neighbour` +`ip {{[n|neighbour]}}` - Remove entries in the neighbour table on device `eth0`: -`sudo ip neighbour flush dev {{eth0}}` +`sudo ip {{[n|neighbour]}} flush dev {{eth0}}` - Perform a neighbour lookup and return a neighbour entry: -`ip neighbour get {{lookup_ip}} dev {{eth0}}` +`ip {{[n|neighbour]}} get {{lookup_ip}} dev {{eth0}}` - Add or delete an ARP entry for the neighbour IP address to `eth0`: -`sudo ip neighbour {{add|del}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable` +`sudo ip {{[n|neighbour]}} {{add|del}} {{ip_address}} lladdr {{mac_address}} dev {{eth0}} nud reachable` - Change or replace an ARP entry for the neighbour IP address to `eth0`: -`sudo ip neighbour {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{eth0}}` +`sudo ip {{[n|neighbour]}} {{change|replace}} {{ip_address}} lladdr {{new_mac_address}} dev {{eth0}}` diff --git a/tldr/linux/ip-route b/tldr/linux/ip-route index 235aab97..7421933a 100644 --- a/tldr/linux/ip-route +++ b/tldr/linux/ip-route @@ -10,28 +10,28 @@ source: https://github.com/tldr-pages/tldr.git - Display the routing table: -`ip route {{show|list}}` +`ip {{[r|route]}} {{show|list}}` - Add a default route using gateway forwarding: -`sudo ip route add default via {{gateway_ip}}` +`sudo ip {{[r|route]}} add default via {{gateway_ip}}` - Add a default route using `eth0`: -`sudo ip route add default dev {{eth0}}` +`sudo ip {{[r|route]}} add default dev {{eth0}}` - Add a static route: -`sudo ip route add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} add {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` - Delete a static route: -`sudo ip route del {{destination_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} del {{destination_ip}} dev {{eth0}}` - Change or replace a static route: -`sudo ip route {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` +`sudo ip {{[r|route]}} {{change|replace}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}` - Show which route will be used by the kernel to reach an IP address: -`ip route get {{destination_ip}}` +`ip {{[r|route]}} get {{destination_ip}}` diff --git a/tldr/linux/ip-route-get b/tldr/linux/ip-route-get index bd974d15..6e61f01d 100644 --- a/tldr/linux/ip-route-get +++ b/tldr/linux/ip-route-get @@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git - Print route to a destination: -`ip route get {{1.1.1.1}}` +`ip {{[r|route]}} get {{1.1.1.1}}` - Print route to a destination from a specific source address: -`ip route get {{destination}} from {{source}}` +`ip {{[r|route]}} get {{destination}} from {{source}}` - Print route to a destination for packets arriving on a specific interface: -`ip route get {{destination}} iif {{eth0}}` +`ip {{[r|route]}} get {{destination}} iif {{eth0}}` - Print route to a destination, forcing output through a specific interface: -`ip route get {{destination}} oif {{eth1}}` +`ip {{[r|route]}} get {{destination}} oif {{eth1}}` - Print route to a destination with a specified Type of Service (ToS): -`ip route get {{destination}} tos {{0x10}}` +`ip {{[r|route]}} get {{destination}} tos {{0x10}}` - Print route to a destination using a specific VRF (Virtual Routing and Forwarding) instance: -`ip route get {{destination}} vrf {{myvrf}}` +`ip {{[r|route]}} get {{destination}} vrf {{myvrf}}` diff --git a/tldr/linux/ip-rule b/tldr/linux/ip-rule index 5843b6bb..da3eb0a1 100644 --- a/tldr/linux/ip-rule +++ b/tldr/linux/ip-rule @@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git - Display the routing policy: -`ip rule {{show|list}}` +`ip {{[ru|rule]}} {{show|list}}` - Add a new rule based on packet source addresses: -`sudo ip rule add from {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} add from {{192.168.178.2/32}}` - Add a new rule based on packet destination addresses: -`sudo ip rule add to {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} add to {{192.168.178.2/32}}` - Delete a rule based on packet source addresses: -`sudo ip rule delete from {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} delete from {{192.168.178.2/32}}` - Delete a rule based on packet destination addresses: -`sudo ip rule delete to {{192.168.178.2/32}}` +`sudo ip {{[ru|rule]}} delete to {{192.168.178.2/32}}` - Flush all deleted rules: -`ip rule flush` +`ip {{[ru|rule]}} flush` - Save all rules to a file: -`ip rule save > {{path/to/ip_rules.dat}}` +`ip {{[ru|rule]}} save > {{path/to/ip_rules.dat}}` - Restore all rules from a file: -`ip rule restore < {{path/to/ip_rules.dat}}` +`ip {{[ru|rule]}} restore < {{path/to/ip_rules.dat}}` diff --git a/tldr/linux/iwinfo b/tldr/linux/iwinfo new file mode 100644 index 00000000..1e9df301 --- /dev/null +++ b/tldr/linux/iwinfo @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# iwinfo + +> Retrieve information about wireless interfaces on OpenWrt. +> More information: . + +- List all available wireless interfaces: + +`iwinfo` + +- Display detailed information on a specific wireless interface: + +`iwinfo {{interface}} info` + +- Scan for nearby wireless networks visible to the interface: + +`iwinfo {{interface}} scan` + +- List connected devices: + +`iwinfo {{interface}} assoclist` + +- List channels supported by the interface: + +`iwinfo {{interface}} freqlist` + +- List available transmit power levels for the interface: + +`iwinfo {{interface}} txpowerlist` diff --git a/tldr/linux/journalctl b/tldr/linux/journalctl index abca28a5..1ad9680a 100644 --- a/tldr/linux/journalctl +++ b/tldr/linux/journalctl @@ -8,21 +8,21 @@ source: https://github.com/tldr-pages/tldr.git > Query the systemd journal. > More information: . -- Show all messages with priority level 3 (errors) from this [b]oot: +- Show all messages with priority level 3 (errors) from this boot: -`journalctl -b --priority=3` +`journalctl {{[-b|--boot]}} {{[-p|--priority]}} 3` - Delete journal logs which are older than 2 days: -`journalctl --vacuum-time=2d` +`journalctl --vacuum-time 2d` -- Show only the last N li[n]es and [f]ollow new messages (like `tail -f` for traditional syslog): +- Show only the last N lines and follow new messages (like `tail -f` for traditional syslog): -`journalctl --lines {{N}} --follow` +`journalctl {{[-n|--lines]}} {{N}} {{[-f|--follow]}}` -- Show all messages by a specific [u]nit: +- Show all messages by a specific unit: -`journalctl --unit {{unit}}` +`journalctl {{[-u|--unit]}} {{unit}}` - Show logs for a given unit since the last time it started: @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Filter messages within a time range (either timestamp or placeholders like "yesterday"): -`journalctl --since {{now|today|yesterday|tomorrow}} --until "{{YYYY-MM-DD HH:MM:SS}}"` +`journalctl {{[-S|--since]}} {{now|today|yesterday|tomorrow}} {{[-U|--until]}} "{{YYYY-MM-DD HH:MM:SS}}"` - Show all messages by a specific process: diff --git a/tldr/linux/kdesrc-build b/tldr/linux/kdesrc-build index 1fe089f9..dbfb069d 100644 --- a/tldr/linux/kdesrc-build +++ b/tldr/linux/kdesrc-build @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Resume compilation from a specific dependency: -`kdesrc-build --resume-from={{dependency_component}} {{component_name}}` +`kdesrc-build --resume-from {{dependency_component}} {{component_name}}` - Run a component with a specified executable name: diff --git a/tldr/linux/kwallet-query b/tldr/linux/kwallet-query index 6a7a058b..e87ffb98 100644 --- a/tldr/linux/kwallet-query +++ b/tldr/linux/kwallet-query @@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git - List all entries in the `Passwords` folder of `kdewallet`: -`kwallet-query {{kdewallet}} {{-l|--list-entries}}` +`kwallet-query {{kdewallet}} {{[-l|--list-entries]}}` - List all entries in a specific folder: -`kwallet-query {{kdewallet}} {{-l|--list-entries}} {{-f|--folder}} {{folder_name}}` +`kwallet-query {{kdewallet}} {{[-l|--list-entries]}} {{[-f|--folder]}} {{folder_name}}` - List all available folders: -`kwallet-query {{kdewallet}} {{-l|--list-entries}} {{-f|--folder}} ""` +`kwallet-query {{kdewallet}} {{[-l|--list-entries]}} {{[-f|--folder]}} ""` diff --git a/tldr/linux/locale b/tldr/linux/locale index fb303935..5fa5b0f2 100644 --- a/tldr/linux/locale +++ b/tldr/linux/locale @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - List all available locales: -`locale --all-locales` +`locale {{[-a|--all-locales]}}` - Display all available locales and the associated metadata: -`locale --all-locales --verbose` +`locale {{[-a|--all-locales]}} {{[-v|--verbose]}}` - Display the current date format: diff --git a/tldr/linux/loginctl b/tldr/linux/loginctl index a5749279..5e80134c 100644 --- a/tldr/linux/loginctl +++ b/tldr/linux/loginctl @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Print a specific property of a user: -`loginctl show-user {{username}} --property={{property_name}}` +`loginctl show-user {{username}} --property {{property_name}}` - Execute a `loginctl` operation on a remote host: diff --git a/tldr/linux/lsfd b/tldr/linux/lsfd index 40ce2002..77f03baf 100644 --- a/tldr/linux/lsfd +++ b/tldr/linux/lsfd @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - List all files kept open by a specific program: -`lsfd {{-Q|--filter}} 'PID == {{process_ID}}'` +`lsfd {{[-Q|--filter]}} 'PID == {{process_ID}}'` - Check what program has a specific file open: -`lsfd {{-Q|--filter}} "NAME == '{{/path/to/file}}'"` +`lsfd {{[-Q|--filter]}} "NAME == '{{/path/to/file}}'"` - List open IPv4 or IPv6 sockets: diff --git a/tldr/linux/lxc-attach b/tldr/linux/lxc-attach new file mode 100644 index 00000000..0c746a29 --- /dev/null +++ b/tldr/linux/lxc-attach @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lxc-attach + +> Attach to a container. +> More information: . + +- Attach to a container: + +`sudo lxc-attach {{container_name}}` diff --git a/tldr/linux/lxc-checkconfig b/tldr/linux/lxc-checkconfig new file mode 100644 index 00000000..d69e27af --- /dev/null +++ b/tldr/linux/lxc-checkconfig @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lxc-checkconfig + +> Check a kernel for LXC support. +> More information: . + +- Check the current kernel for LXC support: + +`lxc-checkconfig` + +- Check any kernel for LXC support: + +`CONFIG={{/path/to/configuration}} lxc-checkconfig` diff --git a/tldr/linux/lxc-destroy b/tldr/linux/lxc-destroy new file mode 100644 index 00000000..5c487cd6 --- /dev/null +++ b/tldr/linux/lxc-destroy @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lxc-destroy + +> Delete a container. +> More information: . + +- Delete a container: + +`sudo lxc-destroy {{container_name}}` diff --git a/tldr/linux/lxc-info b/tldr/linux/lxc-info new file mode 100644 index 00000000..c38a4df8 --- /dev/null +++ b/tldr/linux/lxc-info @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lxc-info + +> Get info on a container. +> More information: . + +- Query information from a container: + +`sudo lxc-info {{container_name}}` diff --git a/tldr/linux/lxc-ls b/tldr/linux/lxc-ls index 1443192c..216b1ea9 100644 --- a/tldr/linux/lxc-ls +++ b/tldr/linux/lxc-ls @@ -8,18 +8,22 @@ source: https://github.com/tldr-pages/tldr.git > List Linux containers. > More information: . +- List all containers: + +`sudo lxc-ls` + - List active containers (including frozen and running): -`lxc-ls --active` +`sudo lxc-ls --active` - List only frozen containers: -`lxc-ls --frozen` +`sudo lxc-ls --frozen` - List only stopped containers: -`lxc-ls --stopped` +`sudo lxc-ls --stopped` - List containers in a fancy, column-based output: -`lxc-ls --fancy` +`sudo lxc-ls --fancy` diff --git a/tldr/linux/lxc-start b/tldr/linux/lxc-start new file mode 100644 index 00000000..f6d65eeb --- /dev/null +++ b/tldr/linux/lxc-start @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lxc-start + +> Start a container. +> More information: . + +- Start a container: + +`sudo lxc-start {{container_name}}` diff --git a/tldr/linux/lxc-stop b/tldr/linux/lxc-stop new file mode 100644 index 00000000..707c6bc7 --- /dev/null +++ b/tldr/linux/lxc-stop @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lxc-stop + +> Stop a container. +> More information: . + +- Stop a container: + +`sudo lxc-stop {{container_name}}` diff --git a/tldr/linux/makepkg b/tldr/linux/makepkg index dddbe1bb..2f89648d 100644 --- a/tldr/linux/makepkg +++ b/tldr/linux/makepkg @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Make a package and install its dependencies: -`makepkg --syncdeps` +`makepkg {{[-s|--syncdeps]}}` - Make a package, install its dependencies then install it to the system: -`makepkg --syncdeps --install` +`makepkg {{[-s|--syncdeps]}} {{[-i|--install]}}` - Make a package, but skip checking the source's hashes: @@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Clean up work directories after a successful build: -`makepkg --clean` +`makepkg {{[-c|--clean]}}` - Verify the hashes of the sources: diff --git a/tldr/linux/mkfs b/tldr/linux/mkfs index 0e117eb5..8b33b260 100644 --- a/tldr/linux/mkfs +++ b/tldr/linux/mkfs @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # mkfs > Build a Linux filesystem on a hard disk partition. -> This command is deprecated in favor of filesystem specific mkfs. utils. +> This command is deprecated in favor of filesystem specific mkfs.type utils. > More information: . - Build a Linux ext2 filesystem on a partition: diff --git a/tldr/linux/mkfs.bcachefs b/tldr/linux/mkfs.bcachefs index 4dd91e56..a9a939b6 100644 --- a/tldr/linux/mkfs.bcachefs +++ b/tldr/linux/mkfs.bcachefs @@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git - Create a `bcachefs` filesystem with a volume label: -`sudo mkfs.bcachefs {{-L|--fs_label}} {{volume_label}} {{/dev/sdX1}}` +`sudo mkfs.bcachefs {{[-L|--fs_label]}} {{volume_label}} {{/dev/sdX1}}` diff --git a/tldr/linux/netplan b/tldr/linux/netplan new file mode 100644 index 00000000..3b378602 --- /dev/null +++ b/tldr/linux/netplan @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# netplan + +> Network configuration utility using YAML. +> More information: . + +- Apply a network configuration and make it persistent: + +`sudo netplan apply` + +- Generate backend configuration files: + +`sudo netplan generate` + +- Configure a network interface to use DHCP: + +`sudo netplan set ethernets.{{interface_name}}.dhcp4=true` + +- Try configuration changes without applying them permanently: + +`sudo netplan try --timeout={{seconds}}` + +- Return to previous working configuration after failed apply: + +`sudo netplan --debug apply` + +- Display the current netplan configuration status: + +`netplan status` diff --git a/tldr/linux/pactree b/tldr/linux/pactree index 88258650..12ee3313 100644 --- a/tldr/linux/pactree +++ b/tldr/linux/pactree @@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git - Print what packages depend on a specific package: -`pactree --reverse {{package}}` +`pactree {{[-r|--reverse]}} {{package}}` - Dump dependencies one per line, skipping duplicates: -`pactree --unique {{package}}` +`pactree {{[-u|--unique]}} {{package}}` - Include optional dependencies of a specific package and colorize the output: -`pactree --optional --color {{package}}` +`pactree {{[-co|--color --optional]}} {{package}}` - Display help: diff --git a/tldr/linux/pihole b/tldr/linux/pihole index 695cc646..cf5c6f3a 100644 --- a/tldr/linux/pihole +++ b/tldr/linux/pihole @@ -5,8 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # pihole -> Terminal interface for the Pi-hole ad-blocking DNS server. -> More information: . +> Manage the Pi-hole ad-blocking DNS server. +> More information: . - Check the Pi-hole daemon's status: @@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git - Update Pi-hole and Gravity: -`pihole -up` - -- Monitor detailed system status: - -`pihole chronometer` +`pihole {{[-up|updatePihole]}}` - Start or stop the daemon: `pihole {{enable|disable}}` -- Restart the daemon (not the server itself): +- Update the lists and flush the cache without restarting the DNS server: -`pihole restartdns` +`pihole reloaddns` -- Whitelist or blacklist a domain: +- Update the list of ad-serving domains: -`pihole {{whitelist|blacklist}} {{example.com}}` +`pihole {{[-g|updateGravity]}}` + +- Allow or deny the specified domain: + +`pihole {{allowlist|denylist}} {{example.com}}` - Search the lists for a domain: -`pihole query {{example.com}}` +`pihole {{[-q|query]}} {{example.com}}` - Open a real-time log of connections: -`pihole tail` +`pihole {{[-t|tail]}}` diff --git a/tldr/linux/pkgctl-repo b/tldr/linux/pkgctl-repo index 2768c62a..7cd100e2 100644 --- a/tldr/linux/pkgctl-repo +++ b/tldr/linux/pkgctl-repo @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Clone a package repository over HTTPS: -`pkgctl repo clone --protocol=https {{pkgname}}` +`pkgctl repo clone --protocol https {{pkgname}}` - Create a new GitLab package repository and clone it after creation (requires valid GitLab API authentication): diff --git a/tldr/linux/plasmashell b/tldr/linux/plasmashell index a4f12708..bc6e68f4 100644 --- a/tldr/linux/plasmashell +++ b/tldr/linux/plasmashell @@ -16,9 +16,9 @@ source: https://github.com/tldr-pages/tldr.git `plasmashell --replace & disown` -- Display [h]elp on command-line options: +- Display help on command-line options: -`plasmashell --help` +`plasmashell {{[-h|--help]}}` - Display help, including Qt options: diff --git a/tldr/linux/pveversion b/tldr/linux/pveversion index bac219ee..49e9aa15 100644 --- a/tldr/linux/pveversion +++ b/tldr/linux/pveversion @@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git - Print Proxmox subpackage versions: -`pveversion {{-v|--verbose}}` +`pveversion {{[-v|--verbose]}}` diff --git a/tldr/linux/pw-link b/tldr/linux/pw-link index b66d3c39..424b769b 100644 --- a/tldr/linux/pw-link +++ b/tldr/linux/pw-link @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - List all audio output and input ports with their IDs: -`pw-link --output --input --ids` +`pw-link {{[-oiI|--output --input --ids]}}` - Create a link between an output and an input port: @@ -18,12 +18,12 @@ source: https://github.com/tldr-pages/tldr.git - Disconnect two ports: -`pw-link --disconnect {{output_port_name}} {{input_port_name}}` +`pw-link {{[-d|--disconnect]}} {{output_port_name}} {{input_port_name}}` - List all links with their IDs: -`pw-link --links --ids` +`pw-link {{[-lI|--links --ids]}}` - Display help: -`pw-link -h` +`pw-link {{[-h|--help]}}` diff --git a/tldr/linux/repo-add b/tldr/linux/repo-add index bbfa29b1..567ad696 100644 --- a/tldr/linux/repo-add +++ b/tldr/linux/repo-add @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Add all package binaries in the current directory and remove the old database file: -`repo-add --remove {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}` +`repo-add {{[-R|--remove]}} {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}` - Add all package binaries in the current directory in silent mode except for warning and error messages: -`repo-add --quiet {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}` +`repo-add {{[-q|--quiet]}} {{path/to/database.db.tar.gz}} {{*.pkg.tar.zst}}` - Add all package binaries in the current directory without showing color: diff --git a/tldr/linux/rm b/tldr/linux/rm index f96295df..a5d94662 100644 --- a/tldr/linux/rm +++ b/tldr/linux/rm @@ -15,20 +15,20 @@ source: https://github.com/tldr-pages/tldr.git - Remove specific files ignoring nonexistent ones: -`rm --force {{path/to/file1 path/to/file2 ...}}` +`rm {{[-f|--force]}} {{path/to/file1 path/to/file2 ...}}` - Remove specific files interactively prompting before each removal: -`rm --interactive {{path/to/file1 path/to/file2 ...}}` +`rm {{[-i|--interactive]}} {{path/to/file1 path/to/file2 ...}}` - Remove specific files printing info about each removal: -`rm --verbose {{path/to/file1 path/to/file2 ...}}` +`rm {{[-v|--verbose]}} {{path/to/file1 path/to/file2 ...}}` - Remove specific files and directories recursively: -`rm --recursive {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`rm {{[-r|--recursive]}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` - Remove empty directories (this is considered the safe method): -`rm --dir {{path/to/directory}}` +`rm {{[-d|--dir]}} {{path/to/directory}}` diff --git a/tldr/linux/sfdisk b/tldr/linux/sfdisk index 9839d932..8f3131fd 100644 --- a/tldr/linux/sfdisk +++ b/tldr/linux/sfdisk @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Back up the partition layout to a file: -`sudo sfdisk {{-d|--dump}} {{path/to/device}} > {{path/to/file.dump}}` +`sudo sfdisk {{[-d|--dump]}} {{path/to/device}} > {{path/to/file.dump}}` - Restore a partition layout: @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`sfdisk {{-h|--help}}` +`sfdisk {{[-h|--help]}}` diff --git a/tldr/linux/speaker-test b/tldr/linux/speaker-test index edc7572e..2ea453fe 100644 --- a/tldr/linux/speaker-test +++ b/tldr/linux/speaker-test @@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git - Test the default speakers with a sine wave: -`speaker-test {{-t|--test}} sine {{-f|--frequency}} {{frequency}}` +`speaker-test {{[-t|--test]}} sine {{[-f|--frequency]}} {{frequency}}` - Test the default speakers with a predefined WAV file: -`speaker-test {{-t|--test}} wav` +`speaker-test {{[-t|--test]}} wav` - Test the default speakers with a WAV file: -`speaker-test {{-t|--test}} wav {{-w|--wavfile}} {{path/to/file}}` +`speaker-test {{[-t|--test]}} wav {{[-w|--wavfile]}} {{path/to/file}}` diff --git a/tldr/linux/swaplabel b/tldr/linux/swaplabel index 31d5cf55..6111fdca 100644 --- a/tldr/linux/swaplabel +++ b/tldr/linux/swaplabel @@ -15,8 +15,8 @@ source: https://github.com/tldr-pages/tldr.git - Set the label of a swap area: -`swaplabel --label {{new_label}} {{path/to/file}}` +`swaplabel {{[-L|--label]}} {{new_label}} {{path/to/file}}` - Set the UUID of a swap area (you can generate a UUID using `uuidgen`): -`swaplabel --uuid {{new_uuid}} {{path/to/file}}` +`swaplabel {{[-U|--uuid]}} {{new_uuid}} {{path/to/file}}` diff --git a/tldr/linux/uname b/tldr/linux/uname index 8dc62363..72824974 100644 --- a/tldr/linux/uname +++ b/tldr/linux/uname @@ -10,32 +10,32 @@ source: https://github.com/tldr-pages/tldr.git - Print all information: -`uname --all` +`uname {{[-a|--all]}}` - Print the current kernel name: -`uname --kernel-name` +`uname {{[-s|--kernel-name]}}` - Print the current network node host name: -`uname --nodename` +`uname {{[-n|--nodename]}}` - Print the current kernel release: -`uname --kernel-release` +`uname {{[-r|--kernel-release]}}` - Print the current kernel version: -`uname --kernel-version` +`uname {{[-v|--kernel-version]}}` - Print the current machine hardware name: -`uname --machine` +`uname {{[-m|--machine]}}` - Print the current processor type: -`uname --processor` +`uname {{[-p|--processsor]}}` - Print the current operating system name: -`uname --operating-system` +`uname {{[-o|--operating-system]}}` diff --git a/tldr/linux/usbip b/tldr/linux/usbip index 7a7148cf..b9f2a50e 100644 --- a/tldr/linux/usbip +++ b/tldr/linux/usbip @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Bind a USB device to `usbip` on the server: -`sudo usbip bind --busid={{bus_id}}` +`sudo usbip bind --busid {{bus_id}}` - Load the kernel module required by `usbip` on the client: @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Attach to the `usbip` device on the client (bus ID is the same as on the server): -`sudo usbip attach -r {{ip_address}} --busid={{bus_id}}` +`sudo usbip attach -r {{ip_address}} --busid {{bus_id}}` - List attached devices: @@ -34,8 +34,8 @@ source: https://github.com/tldr-pages/tldr.git - Detach from a device: -`sudo usbip detach --port={{port}}` +`sudo usbip detach --port {{port}}` - Unbind a device: -`usbip unbind --busid={{bus_id}}` +`usbip unbind --busid {{bus_id}}` diff --git a/tldr/linux/v4l2-ctl b/tldr/linux/v4l2-ctl index 30e94518..2a3c92ec 100644 --- a/tldr/linux/v4l2-ctl +++ b/tldr/linux/v4l2-ctl @@ -18,24 +18,24 @@ source: https://github.com/tldr-pages/tldr.git - List supported video formats and resolutions of a specific video device: -`v4l2-ctl --list-formats-ext --device {{path/to/video_device}}` +`v4l2-ctl --list-formats-ext {{[-d|--device]}} {{path/to/video_device}}` - Get all details of a video device: -`v4l2-ctl --all --device {{path/to/video_device}}` +`v4l2-ctl --all {{[-d|--device]}} {{path/to/video_device}}` - Capture a JPEG photo with a specific resolution from video device: -`v4l2-ctl --device {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat=MJPG --stream-mmap --stream-to={{path/to/output.jpg}} --stream-count=1` +`v4l2-ctl {{[-d|--device]}} {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat=MJPG --stream-mmap --stream-to={{path/to/output.jpg}} --stream-count=1` - Capture a raw video stream from video device: -`v4l2-ctl --device {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat={{format}} --stream-mmap --stream-to={{path/to/output}} --stream-count={{number_of_frames_to_capture}}` +`v4l2-ctl {{[-d|--device]}} {{path/to/video_device}} --set-fmt-video=width={{width}},height={{height}},pixelformat={{format}} --stream-mmap --stream-to={{path/to/output}} --stream-count={{number_of_frames_to_capture}}` - List all video device's controls and their values: -`v4l2-ctl --list-ctrls --device {{path/to/video_device}}` +`v4l2-ctl {{[-l|--list-ctrls]}} {{[-d|--device]}} {{path/to/video_device}}` - Set the value of a video device control: -`v4l2-ctl --device {{path/to/video_device}} --set-ctrl={{control_name}}={{value}}` +`v4l2-ctl {{[-d|--device]}} {{path/to/video_device}} {{[-c|--set-ctrl]}} {{control_name}}={{value}}` diff --git a/tldr/linux/wall b/tldr/linux/wall index e80aa2c9..1df28cfe 100644 --- a/tldr/linux/wall +++ b/tldr/linux/wall @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Send a message to users that belong to a specific group: -`wall --group {{group_name}} {{message}}` +`wall {{[-g|--group]}} {{group_name}} {{message}}` - Send a message from a file: @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Send a message with timeout (default 300): -`wall --timeout {{seconds}} {{file}}` +`wall {{[-t|--timeout]}} {{seconds}} {{file}}` diff --git a/tldr/linux/wol b/tldr/linux/wol index 1cd359c7..49d7cdf2 100644 --- a/tldr/linux/wol +++ b/tldr/linux/wol @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Turn on verbose output: -`wol --verbose {{mac_address}}` +`wol {{[-v|--verbose]}} {{mac_address}}` diff --git a/tldr/linux/xrandr b/tldr/linux/xrandr index 6a6f4483..604a1077 100644 --- a/tldr/linux/xrandr +++ b/tldr/linux/xrandr @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Display the current state of the system (known screens, resolutions, ...): -`xrandr --query` +`xrandr {{[-q|--query]}}` - Disable disconnected outputs and enable connected ones with default settings: @@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git - Display the current state of any X server: -`xrandr --display :{{0}} --query` +`xrandr {{[-d|--display]}} :{{0}} {{[-q|--query]}}` diff --git a/tldr/mail b/tldr/mail index 705a0b7c..18bfabe0 100644 --- a/tldr/mail +++ b/tldr/mail @@ -15,12 +15,12 @@ source: https://github.com/tldr-pages/tldr.git - Send a typed email message with optional CC. The command-line below continues after pressing ``. Input message text (can be multiline). Press `-D` to complete the message text: -`mail --subject="{{subject line}}" {{to_user@example.com}} --cc="{{cc_email_address}}"` +`mail --subject "{{subject line}}" {{to_user@example.com}} --cc "{{cc_email_address}}"` - Send an email that contains file content: -`mail --subject="{{$HOSTNAME filename.txt}}" {{to_user@example.com}} < {{path/to/filename.txt}}` +`mail --subject "{{$HOSTNAME filename.txt}}" {{to_user@example.com}} < {{path/to/filename.txt}}` - Send a `tar.gz` file as an attachment: -`tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject="{{subject_line}}" {{to_user@example.com}}` +`tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject "{{subject_line}}" {{to_user@example.com}}` diff --git a/tldr/mariadb-install-db b/tldr/mariadb-install-db index c72caa7b..a56062a7 100644 --- a/tldr/mariadb-install-db +++ b/tldr/mariadb-install-db @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Initialize a database: -`mariadb-install-db --user={{user}}} --basedir={{/usr}} --datadir={{/var/lib/mysql}}` +`sudo mariadb-install-db --user {{user}} --basedir {{/usr}} --datadir {{/var/lib/mysql}}` diff --git a/tldr/mkdir b/tldr/mkdir index b6ff9c2f..d7ae6b5a 100644 --- a/tldr/mkdir +++ b/tldr/mkdir @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - Create specific directories and their parents if needed: -`mkdir {{-p|--parents}} {{path/to/directory1 path/to/directory2 ...}}` +`mkdir {{[-p|--parents]}} {{path/to/directory1 path/to/directory2 ...}}` - Create directories with specific permissions: -`mkdir {{-m|--mode}} {{rwxrw-r--}} {{path/to/directory1 path/to/directory2 ...}}` +`mkdir {{[-m|--mode]}} {{rwxrw-r--}} {{path/to/directory1 path/to/directory2 ...}}` diff --git a/tldr/mv b/tldr/mv index a94806f0..18b86802 100644 --- a/tldr/mv +++ b/tldr/mv @@ -20,22 +20,22 @@ source: https://github.com/tldr-pages/tldr.git `mv {{path/to/source1 path/to/source2 ...}} {{path/to/existing_directory}}` -- Do not prompt ([f]) for confirmation before overwriting existing files: +- Do not prompt for confirmation before overwriting existing files: -`mv --force {{path/to/source}} {{path/to/target}}` +`mv {{[-f|--force]}} {{path/to/source}} {{path/to/target}}` -- Prompt for confirmation [i]nteractively before overwriting existing files, regardless of file permissions: +- Prompt for confirmation interactively before overwriting existing files, regardless of file permissions: -`mv --interactive {{path/to/source}} {{path/to/target}}` +`mv {{[-i|--interactive]}} {{path/to/source}} {{path/to/target}}` -- Do not overwrite ([n]) existing files at the target: +- Do not overwrite existing files at the target: -`mv --no-clobber {{path/to/source}} {{path/to/target}}` +`mv {{[-n|--no-clobber]}} {{path/to/source}} {{path/to/target}}` -- Move files in [v]erbose mode, showing files after they are moved: +- Move files in verbose mode, showing files after they are moved: -`mv --verbose {{path/to/source}} {{path/to/target}}` +`mv {{[-v|--verbose]}} {{path/to/source}} {{path/to/target}}` -- Specify [t]arget directory so that you can use external tools to gather movable files: +- Specify target directory so that you can use external tools to gather movable files: -`{{find /var/log -type f -name '*.log' -print0}} | {{xargs -0}} mv --target-directory {{path/to/target_directory}}` +`{{find /var/log -type f -name '*.log' -print0}} | {{xargs -0}} mv {{[-t|--target-directory]}} {{path/to/target_directory}}` diff --git a/tldr/mysql_secure_installation b/tldr/mysql_secure_installation index adb42073..9a0a30c5 100644 --- a/tldr/mysql_secure_installation +++ b/tldr/mysql_secure_installation @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Use specific host and port: -`mysql_secure_installation --host={{host}} --port={{port}}` +`mysql_secure_installation --host {{host}} --port {{port}}` - Display help: diff --git a/tldr/nice b/tldr/nice index 0d69278a..dff26109 100644 --- a/tldr/nice +++ b/tldr/nice @@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git - Define the priority with an explicit option: -`nice {{-n|--adjustment}} {{niceness_value}} {{command}}` +`nice {{[-n|--adjustment]}} {{niceness_value}} {{command}}` diff --git a/tldr/npm b/tldr/npm index 98983ac8..11432f4a 100644 --- a/tldr/npm +++ b/tldr/npm @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a `package.json` file with default values (omit `--yes` to do it interactively): -`npm init {{-y|--yes}}` +`npm init {{[-y|--yes]}}` - Download all the packages listed as dependencies in `package.json`: @@ -23,11 +23,11 @@ source: https://github.com/tldr-pages/tldr.git - Download the latest version of a package and add it to the list of dev dependencies in `package.json`: -`npm install {{package_name}} {{-D|--save-dev}}` +`npm install {{package_name}} {{[-D|--save-dev]}}` - Download the latest version of a package and install it globally: -`npm install {{-g|--global}} {{package_name}}` +`npm install {{[-g|--global]}} {{package_name}}` - Uninstall a package and remove it from the list of dependencies in `package.json`: @@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git - List all top-level globally installed packages: -`npm list {{-g|--global}} --depth {{0}}` +`npm list {{[-g|--global]}} --depth {{0}}` diff --git a/tldr/npm-install b/tldr/npm-install index 21ba2b01..a642e9dc 100644 --- a/tldr/npm-install +++ b/tldr/npm-install @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Download the latest version of a package and add it to the list of dev dependencies in `package.json`: -`npm install {{package_name}} {{-D|--save-dev}}` +`npm install {{package_name}} {{[-D|--save-dev]}}` - Download the latest version of a package and install it globally: diff --git a/tldr/osx/base64 b/tldr/osx/base64 index 6471b22f..677eb9ce 100644 --- a/tldr/osx/base64 +++ b/tldr/osx/base64 @@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git - Encode a file to `stdout`: -`base64 {{-i|--input}} {{path/to/file}}` +`base64 {{[-i|--input]}} {{path/to/file}}` - Encode a file to the specified output file: -`base64 {{-i|--input}} {{path/to/input_file}} {{-o|--output}} {{path/to/output_file}}` +`base64 {{[-i|--input]}} {{path/to/input_file}} {{[-o|--output]}} {{path/to/output_file}}` - Wrap encoded output at a specific width (`0` disables wrapping): -`base64 {{-b|--break}} {{0|76|...}} {{path/to/file}}` +`base64 {{[-b|--break]}} {{0|76|...}} {{path/to/file}}` - Decode a file to `stdout`: -`base64 {{-d|--decode}} {{-i|--input}} {{path/to/file}}` +`base64 {{[-d|--decode]}} {{[-i|--input]}} {{path/to/file}}` - Encode from `stdin` to `stdout`: @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Decode from `stdin` to `stdout`: -`{{command}} | base64 {{-d|--decode}}` +`{{command}} | base64 {{[-d|--decode]}}` diff --git a/tldr/osx/caffeinate b/tldr/osx/caffeinate index 99fda03c..36ecb5ca 100644 --- a/tldr/osx/caffeinate +++ b/tldr/osx/caffeinate @@ -20,10 +20,10 @@ source: https://github.com/tldr-pages/tldr.git `caffeinate -w {{pid}}` -- Prevent from sleeping (use `Ctrl + C` to exit): +- Prevent from sleeping (use `` to exit): `caffeinate -i` -- Prevent disk from sleeping (use `Ctrl + C` to exit): +- Prevent disk from sleeping (use `` to exit): `caffeinate -m` diff --git a/tldr/osx/gcrane-completion b/tldr/osx/gcrane-completion index 0fe11582..6112a6fd 100644 --- a/tldr/osx/gcrane-completion +++ b/tldr/osx/gcrane-completion @@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`gcrane completion {{shell_name}} {{-h|--help}}` +`gcrane completion {{shell_name}} {{[-h|--help]}}` diff --git a/tldr/osx/look b/tldr/osx/look index 076cabe7..b1d39721 100644 --- a/tldr/osx/look +++ b/tldr/osx/look @@ -15,11 +15,11 @@ source: https://github.com/tldr-pages/tldr.git - Case-insensitively search only on alphanumeric characters: -`look {{-f|--ignore-case}} {{-d|--alphanum}} {{prefix}} {{path/to/file}}` +`look {{[-f|--ignore-case]}} {{[-d|--alphanum]}} {{prefix}} {{path/to/file}}` - Specify a string termination character (space by default): -`look {{-t|--terminate}} {{,}}` +`look {{[-t|--terminate]}} {{,}}` - Search in `/usr/share/dict/words` (`--ignore-case` and `--alphanum` are assumed): diff --git a/tldr/osx/nettop b/tldr/osx/nettop index 75f918e6..b76a9683 100644 --- a/tldr/osx/nettop +++ b/tldr/osx/nettop @@ -34,7 +34,7 @@ source: https://github.com/tldr-pages/tldr.git - While running nettop, list interactive commands: -`h` +`` - Display help: diff --git a/tldr/osx/pbcopy b/tldr/osx/pbcopy index ea89bd8e..53d703f1 100644 --- a/tldr/osx/pbcopy +++ b/tldr/osx/pbcopy @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # pbcopy > Copy data from `stdin` to the clipboard. -> Comparable to pressing Cmd + C on the keyboard. +> Comparable to pressing `` on the keyboard. > More information: . - Place the contents of a specific file in the clipboard: diff --git a/tldr/osx/pbpaste b/tldr/osx/pbpaste index 40cac7f7..54e67179 100644 --- a/tldr/osx/pbpaste +++ b/tldr/osx/pbpaste @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # pbpaste > Send the contents of the clipboard to `stdout`. -> Comparable to pressing Cmd + V on the keyboard. +> Comparable to pressing `` on the keyboard. > More information: . - Write the contents of the clipboard to a file: diff --git a/tldr/osx/tail b/tldr/osx/tail index 4aa6544a..d53d0396 100644 --- a/tldr/osx/tail +++ b/tldr/osx/tail @@ -21,11 +21,11 @@ source: https://github.com/tldr-pages/tldr.git `tail -c {{8}} {{path/to/file}}` -- Print the last lines of a given file and keep reading it until `Ctrl + C`: +- Print the last lines of a given file and keep reading it until ``: `tail -f {{path/to/file}}` -- Keep reading file until `Ctrl + C`, even if the file is inaccessible: +- Keep reading file until ``, even if the file is inaccessible: `tail -F {{path/to/file}}` diff --git a/tldr/osx/top b/tldr/osx/top index 8a91a28e..a86bca8d 100644 --- a/tldr/osx/top +++ b/tldr/osx/top @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help about interactive commands: -`?` +`` diff --git a/tldr/passwd b/tldr/passwd index 5c217724..4376b528 100644 --- a/tldr/passwd +++ b/tldr/passwd @@ -18,8 +18,8 @@ source: https://github.com/tldr-pages/tldr.git - Get the current status of the user: -`passwd {{-S|--status}}` +`passwd {{[-S|--status]}}` - Make the password of the account blank (it will set the named account passwordless): -`passwd {{-d|--delete}}` +`passwd {{[-d|--delete]}}` diff --git a/tldr/rsync b/tldr/rsync index 26679656..9db23ddc 100644 --- a/tldr/rsync +++ b/tldr/rsync @@ -15,28 +15,28 @@ source: https://github.com/tldr-pages/tldr.git - Use archive mode (recursively copy directories, copy symlinks without resolving, and preserve permissions, ownership and modification times): -`rsync {{-a|--archive}} {{path/to/source}} {{path/to/destination}}` +`rsync {{[-a|--archive]}} {{path/to/source}} {{path/to/destination}}` - Compress the data as it is sent to the destination, display verbose and human-readable progress, and keep partially transferred files if interrupted: -`rsync {{-zvhP|--compress --verbose --human-readable --partial --progress}} {{path/to/source}} {{path/to/destination}}` +`rsync {{[-zvhP|--compress --verbose --human-readable --partial --progress]}} {{path/to/source}} {{path/to/destination}}` - Recursively copy directories: -`rsync {{-r|--recursive}} {{path/to/source}} {{path/to/destination}}` +`rsync {{[-r|--recursive]}} {{path/to/source}} {{path/to/destination}}` - Transfer directory contents, but not the directory itself: -`rsync {{-r|--recursive}} {{path/to/source}}/ {{path/to/destination}}` +`rsync {{[-r|--recursive]}} {{path/to/source}}/ {{path/to/destination}}` - Use archive mode, resolve symlinks, and skip files that are newer on the destination: -`rsync {{-auL|--archive --update --copy-links}} {{path/to/source}} {{path/to/destination}}` +`rsync {{[-auL|--archive --update --copy-links]}} {{path/to/source}} {{path/to/destination}}` - Transfer a directory from a remote host running `rsyncd` and delete files on the destination that do not exist on the source: -`rsync {{-r|--recursive}} --delete rsync://{{host}}:{{path/to/source}} {{path/to/destination}}` +`rsync {{[-r|--recursive]}} --delete rsync://{{host}}:{{path/to/source}} {{path/to/destination}}` - Transfer a file over SSH using a different port than the default (22) and show global progress: -`rsync {{-e|--rsh}} 'ssh -p {{port}}' --info=progress2 {{host}}:{{path/to/source}} {{path/to/destination}}` +`rsync {{[-e|--rsh]}} 'ssh -p {{port}}' --info=progress2 {{host}}:{{path/to/source}} {{path/to/destination}}` diff --git a/tldr/set b/tldr/set index b2f5113d..34cfd5b2 100644 --- a/tldr/set +++ b/tldr/set @@ -32,10 +32,10 @@ source: https://github.com/tldr-pages/tldr.git `set -o` -- Exit the shell when (some) commands fail: +- Exit the shell when (some) command fails: `set -e` - Reset all shell parameters and assign new ones: -`set -- {{argument1 argument2...}}` +`set -- {{argument1 argument2 ...}}` diff --git a/tldr/snmpdf b/tldr/snmpdf index 86580000..32ce3334 100644 --- a/tldr/snmpdf +++ b/tldr/snmpdf @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Fetch the disk space usage: -`snmpget -v {{version}} -c {{community}} {{ip}}` +`snmpdf -v {{version}} -c {{community}} {{ip}}` diff --git a/tldr/snmpgetnext b/tldr/snmpgetnext index 9f1991c9..dd78de81 100644 --- a/tldr/snmpgetnext +++ b/tldr/snmpgetnext @@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git - Request the next value from the SNMP agent: -`snmpget -v {{version}} -c {{community}} {{ip}} {{oid}}` +`snmpgetnext -v {{version}} -c {{community}} {{ip}} {{oid}}` - Display the full Object Identifier (OID) path: -`snmpget -v {{version}} -c {{community}} -O f {{ip}} {{oid}}` +`snmpgetnext -v {{version}} -c {{community}} -O f {{ip}} {{oid}}` diff --git a/tldr/snmpset b/tldr/snmpset index 108c280a..edcda218 100644 --- a/tldr/snmpset +++ b/tldr/snmpset @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Set a value: -`snmpget -v {{version}} -c {{community}} {{ip}} {{oid}} {{value_type}} {{value}}` +`snmpset -v {{version}} -c {{community}} {{ip}} {{oid}} {{value_type}} {{value}}` diff --git a/tldr/snmpstatus b/tldr/snmpstatus index d340253c..9fb5ce00 100644 --- a/tldr/snmpstatus +++ b/tldr/snmpstatus @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Fetch the values: -`snmpget -v {{version}} -c {{community}} {{ip}}` +`snmpstatus -v {{version}} -c {{community}} {{ip}}` diff --git a/tldr/snmptable b/tldr/snmptable index 8d58e0e1..812ce76c 100644 --- a/tldr/snmptable +++ b/tldr/snmptable @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Fetch data: -`snmpget -v {{version}} -c {{community}} {{ip}} {{oid}}` +`snmptable -v {{version}} -c {{community}} {{ip}} {{oid}}` diff --git a/tldr/snmptest b/tldr/snmptest index 38f00c0e..2e9d2643 100644 --- a/tldr/snmptest +++ b/tldr/snmptest @@ -10,4 +10,4 @@ source: https://github.com/tldr-pages/tldr.git - Start the prompt: -`snmpget -v {{version}} -c {{community}} {{ip}}` +`snmptest -v {{version}} -c {{community}} {{ip}}` diff --git a/tldr/wezterm b/tldr/wezterm new file mode 100644 index 00000000..f5e310a6 --- /dev/null +++ b/tldr/wezterm @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# wezterm + +> Wez's Terminal Emulator - a powerful cross-platform terminal emulator and multiplexer. +> More information: . + +- Start a new Wezterm process and create a window: + +`wezterm` + +- Establish an `ssh` session: + +`wezterm ssh {{user}}@{{host}}:{{port}}` + +- Connect to the multiplexer (`wezterm-mux-server`): + +`wezterm connect {{domain_name}}` + +- Output an image to the terminal: + +`wezterm imgcat {{path/to/image}}` + +- Record a terminal session as an asciicat (by default recordings are found in `/tmp`): + +`wezterm record` + +- Replay an asciicat terminal session: + +`wezterm replay {{path/to/cast_file}}` + +- Specify the configuration file to use (overrides the normal configuration file resolution): + +`wezterm --config-file {{path/to/config_file}}` + +- Display help: + +`wezterm help` diff --git a/tldr/windows/gcrane-completion b/tldr/windows/gcrane-completion index 5f4f0312..4f81817e 100644 --- a/tldr/windows/gcrane-completion +++ b/tldr/windows/gcrane-completion @@ -27,4 +27,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`gcrane completion {{shell_name}} {{-h|--help}}` +`gcrane completion {{shell_name}} {{[-h|--help]}}` diff --git a/tldr/zoxide b/tldr/zoxide index 0611851a..7e87862b 100644 --- a/tldr/zoxide +++ b/tldr/zoxide @@ -25,9 +25,9 @@ source: https://github.com/tldr-pages/tldr.git `zoxide add {{path/to/directory}}` -- Remove a directory from `zoxide`'s database interactively: +- Remove a directory from `zoxide`'s database: -`zoxide remove {{path/to/directory}} --interactive` +`zoxide remove {{path/to/directory}}` - Generate shell configuration for command aliases (`z`, `za`, `zi`, `zq`, `zr`):