mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-04 21:44:00 +00:00
Update cheatsheets
This commit is contained in:
2
tldr/!
2
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: <https://gnu.org/software/bash/manual/bash.html#Event-Designators>.
|
||||
|
||||
- Substitute with the previous command and run it with `sudo`:
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
14
tldr/git-add
14
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]}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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`):
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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/<name>.
|
||||
> Feature branches obey the format feature/name.
|
||||
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-feature>.
|
||||
|
||||
- Create and switch to a new feature branch:
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -8,25 +8,25 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Stash local Git changes in a temporary area.
|
||||
> More information: <https://git-scm.com/docs/git-stash>.
|
||||
|
||||
- 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}):
|
||||
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
12
tldr/iotop
12
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]}}`
|
||||
|
||||
37
tldr/linux/apachectl
Normal file
37
tldr/linux/apachectl
Normal file
@@ -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: <https://manned.org/apachectl>.
|
||||
|
||||
- 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`
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
33
tldr/linux/iwinfo
Normal file
33
tldr/linux/iwinfo
Normal file
@@ -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: <https://openwrt.org/docs/guide-developer/ubus/iwinfo>.
|
||||
|
||||
- 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`
|
||||
@@ -8,21 +8,21 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Query the systemd journal.
|
||||
> More information: <https://manned.org/journalctl>.
|
||||
|
||||
- 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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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]}} ""`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
13
tldr/linux/lxc-attach
Normal file
13
tldr/linux/lxc-attach
Normal file
@@ -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: <https://linuxcontainers.org/lxc/getting-started/>.
|
||||
|
||||
- Attach to a container:
|
||||
|
||||
`sudo lxc-attach {{container_name}}`
|
||||
17
tldr/linux/lxc-checkconfig
Normal file
17
tldr/linux/lxc-checkconfig
Normal file
@@ -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: <https://linuxcontainers.org/lxc/getting-started/>.
|
||||
|
||||
- Check the current kernel for LXC support:
|
||||
|
||||
`lxc-checkconfig`
|
||||
|
||||
- Check any kernel for LXC support:
|
||||
|
||||
`CONFIG={{/path/to/configuration}} lxc-checkconfig`
|
||||
13
tldr/linux/lxc-destroy
Normal file
13
tldr/linux/lxc-destroy
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lxc-destroy
|
||||
|
||||
> Delete a container.
|
||||
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
|
||||
|
||||
- Delete a container:
|
||||
|
||||
`sudo lxc-destroy {{container_name}}`
|
||||
13
tldr/linux/lxc-info
Normal file
13
tldr/linux/lxc-info
Normal file
@@ -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: <https://linuxcontainers.org/lxc/getting-started/>.
|
||||
|
||||
- Query information from a container:
|
||||
|
||||
`sudo lxc-info {{container_name}}`
|
||||
@@ -8,18 +8,22 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> List Linux containers.
|
||||
> More information: <https://linuxcontainers.org/lxc/manpages/man1/lxc-ls.1.html>.
|
||||
|
||||
- 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`
|
||||
|
||||
13
tldr/linux/lxc-start
Normal file
13
tldr/linux/lxc-start
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lxc-start
|
||||
|
||||
> Start a container.
|
||||
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
|
||||
|
||||
- Start a container:
|
||||
|
||||
`sudo lxc-start {{container_name}}`
|
||||
13
tldr/linux/lxc-stop
Normal file
13
tldr/linux/lxc-stop
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lxc-stop
|
||||
|
||||
> Stop a container.
|
||||
> More information: <https://linuxcontainers.org/lxc/getting-started/>.
|
||||
|
||||
- Stop a container:
|
||||
|
||||
`sudo lxc-stop {{container_name}}`
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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.<type> utils.
|
||||
> This command is deprecated in favor of filesystem specific mkfs.type utils.
|
||||
> More information: <https://manned.org/mkfs>.
|
||||
|
||||
- Build a Linux ext2 filesystem on a partition:
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
33
tldr/linux/netplan
Normal file
33
tldr/linux/netplan
Normal file
@@ -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: <https://netplan.io/>.
|
||||
|
||||
- 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`
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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: <https://docs.pi-hole.net/core/pihole-command/>.
|
||||
> Manage the Pi-hole ad-blocking DNS server.
|
||||
> More information: <https://docs.pi-hole.net/main/pihole-command>.
|
||||
|
||||
- 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]}}`
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print Proxmox subpackage versions:
|
||||
|
||||
`pveversion {{-v|--verbose}}`
|
||||
`pveversion {{[-v|--verbose]}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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 `<Enter>`. Input message text (can be multiline). Press `<Ctrl>-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}}`
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
@@ -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 ...}}`
|
||||
|
||||
20
tldr/mv
20
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}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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}}`
|
||||
|
||||
8
tldr/npm
8
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}}`
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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 `<Ctrl c>` to exit):
|
||||
|
||||
`caffeinate -i`
|
||||
|
||||
- Prevent disk from sleeping (use `Ctrl + C` to exit):
|
||||
- Prevent disk from sleeping (use `<Ctrl c>` to exit):
|
||||
|
||||
`caffeinate -m`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
@@ -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):
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- While running nettop, list interactive commands:
|
||||
|
||||
`h`
|
||||
`<h>`
|
||||
|
||||
- Display help:
|
||||
|
||||
|
||||
@@ -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 `<Cmd c>` on the keyboard.
|
||||
> More information: <https://keith.github.io/xcode-man-pages/pbcopy.1.html>.
|
||||
|
||||
- Place the contents of a specific file in the clipboard:
|
||||
|
||||
@@ -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 `<Cmd v>` on the keyboard.
|
||||
> More information: <https://keith.github.io/xcode-man-pages/pbpaste.1.html>.
|
||||
|
||||
- Write the contents of the clipboard to a file:
|
||||
|
||||
@@ -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 `<Ctrl c>`:
|
||||
|
||||
`tail -f {{path/to/file}}`
|
||||
|
||||
- Keep reading file until `Ctrl + C`, even if the file is inaccessible:
|
||||
- Keep reading file until `<Ctrl c>`, even if the file is inaccessible:
|
||||
|
||||
`tail -F {{path/to/file}}`
|
||||
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help about interactive commands:
|
||||
|
||||
`?`
|
||||
`<?>`
|
||||
|
||||
@@ -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]}}`
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user