diff --git a/tldr/antibody b/tldr/antibody index 5cbbc70f..05a810ad 100644 --- a/tldr/antibody +++ b/tldr/antibody @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Bundle all plugins for static loading: -`antibody bundle < {{~/.zsh_plugins.txt}} > {{~/.zsh_plugins.sh}}` +`antibody < {{~/.zsh_plugins.txt}} bundle > {{~/.zsh_plugins.sh}}` - Update all bundles: diff --git a/tldr/az-container b/tldr/az-container new file mode 100644 index 00000000..b16db954 --- /dev/null +++ b/tldr/az-container @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# az container + +> Manage Azure Container Instances. +> Part of `azure-cli` (also known as `az`). +> More information: . + +- Create a container in a container group: + +`az container create {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{name}} --image {{image_name}} {{[-os|--os-type]}} {{windows|linux}} --cpu {{number_of_CPU_cores}} --memory {{memory_in_GB}}` + +- Execute a command from within a running container of a container group: + +`az container exec {{[-g|--resource-group]}} {{resource_group}} {{[-n|--name]}} {{container_group_name}} --exec-command "{{command}}"` + +- Examine the logs of a container in a container group: + +`az container logs {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}` + +- Get the details of a container group: + +`az container show {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}` + +- Start all containers in a container group: + +`az container start {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}` + +- Stop all containers in a container group: + +`az container stop {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}` + +- Delete a container group: + +`az container delete {{[-n|--name]}} {{name}} {{[-g|--resource-group]}} {{resource_group}}` diff --git a/tldr/clang-check b/tldr/clang-check new file mode 100644 index 00000000..fa74bac5 --- /dev/null +++ b/tldr/clang-check @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# clang-check + +> Check basic errors and work with Clang's Abstract Syntax Tree (AST). +> Part of Clang's LibTooling and is useful for debugging and analyzing C/C++ code. +> More information: . + +- Run default checks on a source file: + +`clang-check {{path/to/file.cpp}} --` + +- Dump the Abstract Syntax Tree for debugging: + +`clang-check {{path/to/file.cpp}} -ast-dump --` + +- Filter AST by Name: + +`clang-check {{path/to/file.cpp}} -ast-dump -ast-dump-filter FunctionName` + +- Pretty-Print AST: + +`clang-check {{path/to/file.cpp}} -ast-print --` diff --git a/tldr/copyq b/tldr/copyq index f241ea8a..d1b72668 100644 --- a/tldr/copyq +++ b/tldr/copyq @@ -32,8 +32,8 @@ secondline}}` - Copy a file's contents into the clipboard: -`copyq copy < {{path/to/file.txt}}` +`copyq < {{path/to/file.txt}} copy` - Copy a JPEG image into the clipboard: -`copyq copy image/jpeg < {{path/to/image.jpg}}` +`copyq < {{path/to/image.jpg}} copy image/jpeg` diff --git a/tldr/crane-export b/tldr/crane-export index 7cc7de35..580b33dd 100644 --- a/tldr/crane-export +++ b/tldr/crane-export @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Read image from `stdin`: -`crane export - {{path/to/filename}}` +`crane export - {{path/to/file}}` diff --git a/tldr/crane-push b/tldr/crane-push index 0cc0fa62..3e3a16be 100644 --- a/tldr/crane-push +++ b/tldr/crane-push @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Path to file with list of published image references: -`crane push {{path/to/tarball}} {{image_name}} --image-refs {{path/to/filename}}` +`crane push {{path/to/tarball}} {{image_name}} --image-refs {{path/to/file}}` - Push a collection of images as a single index (required if path has multiple images): diff --git a/tldr/csc b/tldr/csc index e75be185..82609094 100644 --- a/tldr/csc +++ b/tldr/csc @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify the output filename: -`csc /out:{{path/to/filename}} {{path/to/input_file.cs}}` +`csc /out:{{path/to/file}} {{path/to/input_file.cs}}` - Compile into a `.dll` library instead of an executable: diff --git a/tldr/doxygen b/tldr/doxygen index b4f867a5..4ad4dae3 100644 --- a/tldr/doxygen +++ b/tldr/doxygen @@ -6,7 +6,11 @@ source: https://github.com/tldr-pages/tldr.git # doxygen > A documentation system for various programming languages. -> More information: . +> More information: . + +- Generate documentation, using `Doxyfile` as configuration file if it exists: + +`doxygen` - Generate a default template configuration file `Doxyfile`: diff --git a/tldr/enable b/tldr/enable index 0ba0e470..947cec58 100644 --- a/tldr/enable +++ b/tldr/enable @@ -12,6 +12,6 @@ source: https://github.com/tldr-pages/tldr.git `enable` -- Disable a builtin (works in `bash` only): +- Disable a builtin (works in Bash only): `enable -n {{command}}` diff --git a/tldr/enca b/tldr/enca index 45a0b25f..ea1f6fdb 100644 --- a/tldr/enca +++ b/tldr/enca @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Create a copy of an existing file using a different encoding: -`enca {{[-L|--language]}} {{language}} {{[-x|--convert-to]}} {{to_encoding}} < {{original_file}} > {{new_file}}` +`enca < {{original_file}} {{[-L|--language]}} {{language}} {{[-x|--convert-to]}} {{to_encoding}} > {{new_file}}` diff --git a/tldr/envsubst b/tldr/envsubst index 9ee0b505..d36cbe3e 100644 --- a/tldr/envsubst +++ b/tldr/envsubst @@ -23,4 +23,4 @@ source: https://github.com/tldr-pages/tldr.git - Replace environment variables in an input file from a space-separated list: -`envsubst '{{$USER $SHELL $HOME}}' < {{path/to/input_file}}` +`envsubst < {{path/to/input_file}} '{{$USER $SHELL $HOME}}'` diff --git a/tldr/exo-storage b/tldr/exo-storage index 0466eb47..72be77ef 100644 --- a/tldr/exo-storage +++ b/tldr/exo-storage @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Upload a file to a bucket: -`exo storage put {{file_path}} {{bucket_name}}/{{prefix/}}` +`exo storage put {{path/to/file}} {{bucket_name}}/{{prefix/}}` - List the objects within a bucket: diff --git a/tldr/fossil-init b/tldr/fossil-init index 736c298e..403ef73f 100644 --- a/tldr/fossil-init +++ b/tldr/fossil-init @@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git - Create a new repository in a named file: -`fossil init {{path/to/filename}}` +`fossil init {{path/to/file}}` diff --git a/tldr/gh-pr-comment b/tldr/gh-pr-comment new file mode 100644 index 00000000..70da29d4 --- /dev/null +++ b/tldr/gh-pr-comment @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh pr comment + +> Add a comment to a GitHub pull request. +> More information: . + +- Comment on the pull request of the current branch: + +`gh pr comment {{[-b|--body]}} "{{LGTM}}"` + +- Comment on a specific pull request: + +`gh pr comment {{123}} {{[-b|--body]}} "{{Thanks!}}"` + +- Comment from a file: + +`gh pr comment {{123}} {{[-F|--body-file]}} {{path/to/file.txt}}` + +- Open the editor to write a multi-line comment: + +`gh pr comment {{123}}` diff --git a/tldr/gh-pr-view b/tldr/gh-pr-view new file mode 100644 index 00000000..12f5c298 --- /dev/null +++ b/tldr/gh-pr-view @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gh pr view + +> View details of a GitHub pull request. +> More information: . + +- View the pull request associated with the current branch: + +`gh pr view` + +- View a specific pull request: + +`gh pr view {{123}}` + +- Open the pull request in the default web browser: + +`gh pr view {{[-w|--web]}}` + +- Show comments in the terminal: + +`gh pr view {{123}} {{[-c|--comments]}}` diff --git a/tldr/git-fast-export b/tldr/git-fast-export index 4ef1f685..29aed2d4 100644 --- a/tldr/git-fast-export +++ b/tldr/git-fast-export @@ -24,6 +24,6 @@ source: https://github.com/tldr-pages/tldr.git `git fast-export --progress {{n}} --all > {{path/to/file}}` -- Export only a specific subdirectory’s history: +- Export only a specific subdirectory's history: `git fast-export --all -- {{path/to/directory}} > {{path/to/file}}` diff --git a/tldr/git-sparse-checkout b/tldr/git-sparse-checkout index ed377a96..6250dad8 100644 --- a/tldr/git-sparse-checkout +++ b/tldr/git-sparse-checkout @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # git sparse-checkout -> Check out only part of a repository’s files instead of cloning or checking out everything. +> Check out only part of a repository's files instead of cloning or checking out everything. > More information: . - Enable sparse checkout: diff --git a/tldr/gitlint b/tldr/gitlint index cefcb8e2..84a286b8 100644 --- a/tldr/gitlint +++ b/tldr/gitlint @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Path to a file containing a commit-msg: -`gitlint --msg-filename {{path/to/filename}}` +`gitlint --msg-filename {{path/to/file}}` - Read staged commit meta-info from the local repository: diff --git a/tldr/gnmic-set b/tldr/gnmic-set index c660e7a9..03f2080b 100644 --- a/tldr/gnmic-set +++ b/tldr/gnmic-set @@ -10,16 +10,16 @@ source: https://github.com/tldr-pages/tldr.git - Update the value of a path: -`gnmic {{[-a|--address]}} {{ip:port}} set --update-path {{path}} --update-value {{value}}` +`gnmic {{[-a|--address]}} {{ip:port}} set --update-path {{path/to/directory}} --update-value {{value}}` - Update the value of a path to match the contents of a JSON file: -`gnmic {{[-a|--address]}} {{ip:port}} set --update-path {{path}} --update-file {{filepath}}` +`gnmic {{[-a|--address]}} {{ip:port}} set --update-path {{path/to/directory}} --update-file {{path/to/file}}` - Replace the value of a path to match the contents of a JSON file: -`gnmic {{[-a|--address]}} {{ip:port}} set --replace-path {{path}} --replace-file {{filepath}}` +`gnmic {{[-a|--address]}} {{ip:port}} set --replace-path {{path/to/directory}} --replace-file {{path/to/file}}` - Delete the node at a given path: -`gnmic {{[-a|--address]}} {{ip:port}} set --delete {{path}}` +`gnmic {{[-a|--address]}} {{ip:port}} set --delete {{path/to/directory}}` diff --git a/tldr/gnuplot b/tldr/gnuplot index 82b66e19..5c7331a3 100644 --- a/tldr/gnuplot +++ b/tldr/gnuplot @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Set the output format by executing a command before loading the definition file: -`gnuplot -e "{{set output "path/to/filename.png" size 1024,768}}" {{path/to/definition.plt}}` +`gnuplot -e "{{set output "path/to/file.png" size 1024,768}}" {{path/to/definition.plt}}` - Persist the graph plot preview window after gnuplot exits: diff --git a/tldr/inkscape b/tldr/inkscape index b5c9f96f..cac07d1f 100644 --- a/tldr/inkscape +++ b/tldr/inkscape @@ -15,15 +15,15 @@ source: https://github.com/tldr-pages/tldr.git - Export an SVG file into a bitmap with the default format (PNG) and the default resolution (96 DPI): -`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/filename.png}}` +`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/file.png}}` - Export an SVG file into a bitmap of 600x400 pixels (aspect ratio distortion may occur): -`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/filename.png}} {{[-w|--export-width]}} 600 {{[-h|--export-height]}} 400` +`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/file.png}} {{[-w|--export-width]}} 600 {{[-h|--export-height]}} 400` - Export the drawing (bounding box of all objects) of an SVG file into a bitmap: -`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/filename.png}} {{[-D|--export-area-drawing]}}` +`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/file.png}} {{[-D|--export-area-drawing]}}` - Export a single object, given its ID, into a bitmap: @@ -31,7 +31,7 @@ source: https://github.com/tldr-pages/tldr.git - Export an SVG document to PDF, converting all texts to paths: -`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/filename.pdf}} {{[-T|--export-text-to-path]}}` +`inkscape {{path/to/file.svg}} {{[-o|--export-filename]}} {{path/to/file.pdf}} {{[-T|--export-text-to-path]}}` - Duplicate the object with id="path123", rotate the duplicate 90 degrees, save the file, and quit Inkscape: diff --git a/tldr/jdeps b/tldr/jdeps index 4713c7c7..dcf7a474 100644 --- a/tldr/jdeps +++ b/tldr/jdeps @@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git - Analyze the dependencies of a `.jar` or `.class` file: -`jdeps {{path/to/filename.class}}` +`jdeps {{path/to/file.class}}` - Print a summary of all dependencies of a specific `.jar` file: -`jdeps {{path/to/filename.jar}} -summary` +`jdeps {{path/to/file.jar}} -summary` - Print all class-level dependencies of a `.jar` file: -`jdeps {{path/to/filename.jar}} -verbose` +`jdeps {{path/to/file.jar}} -verbose` - Output the results of the analysis in a DOT file into a specific directory: -`jdeps {{path/to/filename.jar}} -dotoutput {{path/to/directory}}` +`jdeps {{path/to/file.jar}} -dotoutput {{path/to/directory}}` - Display help: diff --git a/tldr/kubectl-apply b/tldr/kubectl-apply index 8760486f..3c16bf3b 100644 --- a/tldr/kubectl-apply +++ b/tldr/kubectl-apply @@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git - Apply a configuration to a resource by file name: -`kubectl apply {{[-f|--filename]}} {{path/to/filename}}` +`kubectl apply {{[-f|--filename]}} {{path/to/file}}` - Apply a configuration to a resource from `kustomization.yaml` in a directory: @@ -23,12 +23,12 @@ source: https://github.com/tldr-pages/tldr.git - Edit the latest last-applied-configuration annotations of resources from the default editor: -`kubectl apply edit-last-applied {{[-f|--filename]}} {{path/to/filename}}` +`kubectl apply edit-last-applied {{[-f|--filename]}} {{path/to/file}}` - Set the latest last-applied-configuration annotations by setting it to match the contents of a file: -`kubectl apply set-last-applied {{[-f|--filename]}} {{path/to/filename}}` +`kubectl apply set-last-applied {{[-f|--filename]}} {{path/to/file}}` - View the latest last-applied-configuration annotations by type/name or file: -`kubectl apply view-last-applied {{[-f|--filename]}} {{path/to/filename}}` +`kubectl apply view-last-applied {{[-f|--filename]}} {{path/to/file}}` diff --git a/tldr/kubeseal b/tldr/kubeseal index 440beef5..57c60d49 100644 --- a/tldr/kubeseal +++ b/tldr/kubeseal @@ -16,11 +16,11 @@ source: https://github.com/tldr-pages/tldr.git - Encrypt a secret, outputting it in YAML or JSON format, using a bearer token for API authentication: -`kubeseal {{[-o|--format]}} {{yaml|json}} --token {{my-bearer-token}} < {{secret.yaml}} > {{sealedsecret.yaml}}` +`kubeseal < {{secret.yaml}} {{[-o|--format]}} {{yaml|json}} --token {{my-bearer-token}} > {{sealedsecret.yaml}}` - Seal a secret using a specific controller namespace of sealed-secrets controller and name: -`kubeseal --controller-namespace {{controller-namespace}} --controller-name {{controller-name}} < {{secret.yaml}} > {{sealedsecret.yaml}}` +`kubeseal < {{secret.yaml}} --controller-namespace {{controller-namespace}} --controller-name {{controller-name}} > {{sealedsecret.yaml}}` - Encrypt a raw secret value from a file with a specified name and scope: @@ -32,12 +32,12 @@ source: https://github.com/tldr-pages/tldr.git - Seal a secret offline using a fetched certificate: -`kubeseal --cert {{cert.pem}} < {{secret.yaml}} > {{sealedsecret.yaml}}` +`kubeseal < {{secret.yaml}} --cert {{cert.pem}} > {{sealedsecret.yaml}}` - Merge a secret into an existing SealedSecret file in-place: -`kubeseal --merge-into {{sealedsecret.yaml}} < {{secret.yaml}}` +`kubeseal < {{secret.yaml}} --merge-into {{sealedsecret.yaml}}` - Validate a SealedSecret without applying it: -`kubeseal --validate < {{sealedsecret.yaml}}` +`kubeseal < {{sealedsecret.yaml}} --validate` diff --git a/tldr/linux/audit2allow b/tldr/linux/audit2allow index 82247775..0a1fd305 100644 --- a/tldr/linux/audit2allow +++ b/tldr/linux/audit2allow @@ -5,22 +5,39 @@ source: https://github.com/tldr-pages/tldr.git --- # audit2allow -> Create an SELinux local policy module to allow rules based on denied operations found in logs. -> Note: Use audit2allow with caution. Always review the generated policy before applying it, as it may allow excessive access. +> Generate SELinux policy allow rules from audit logs. +> Part of the `policycoreutils-python-utils` package. +> See also: `audit2why`, `ausearch`, `semodule`. > More information: . -- Generate a local policy to allow access for all denied services: +- Generate allow rules from recent audit denials and display them: -`sudo audit2allow {{[-a|--all]}} -M {{local_policy_name}}` +`sudo audit2allow {{[-a|--all]}}` -- Generate a local policy module to grant access to a specific process/service/command from the audit logs: +- Generate allow rules from a specific audit log file: -`sudo grep {{apache2}} /var/log/audit/audit.log | sudo audit2allow -M {{local_policy_name}}` +`sudo audit2allow {{[-i|--input]}} {{path/to/audit.log}}` -- Inspect and review the Type Enforcement (.te) file for a local policy: +- Generate a policy module from recent audit denials: -`vim {{local_policy_name}}.te` +`sudo audit2allow {{[-a|--all]}} {{[-M|--module]}} {{module_name}}` -- Install a local policy module: +- Explain why SELinux denials occurred (same as `audit2why`): -`sudo semodule {{[-i|--install]}} {{local_policy_name}}.pp` +`sudo audit2allow {{[-a|--all]}} --why` + +- Display detailed information around generated messages: + +`sudo audit2allow {{[-a|--all]}} {{[-e|--explain]}}` + +- Use installed macros to generate a reference policy: + +`sudo audit2allow {{[-a|--all]}} {{[-R|--reference]}}` + +- Generate allow rules for a specific service: + +`sudo ausearch {{[-m|--message]}} avc {{[-c|--comm]}} {{service_name}} | audit2allow {{[-M|--module]}} {{policy_name}}` + +- Enable verbose output mode: + +`sudo audit2allow {{[-a|--all]}} {{[-v|--verbose]}}` diff --git a/tldr/linux/audit2why b/tldr/linux/audit2why new file mode 100644 index 00000000..5df89fdd --- /dev/null +++ b/tldr/linux/audit2why @@ -0,0 +1,27 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# audit2why + +> Explain SELinux denials from audit logs. +> Part of the `policycoreutils-python-utils` package. +> See also: `audit2allow`, `ausearch`, `sealert`. +> More information: . + +- Explain the most recent SELinux denial: + +`sudo audit2why` + +- Explain SELinux denials from a specific audit log file: + +`sudo audit2why {{[-i|--input]}} {{path/to/audit.log}}` + +- Explain all SELinux denials from the audit log: + +`sudo ausearch {{[-m|--message]}} avc | audit2why` + +- Explain denials for a specific service: + +`sudo ausearch {{[-m|--message]}} avc {{[-c|--comm]}} {{service_name}} | audit2why` diff --git a/tldr/linux/chcat b/tldr/linux/chcat new file mode 100644 index 00000000..c728d3aa --- /dev/null +++ b/tldr/linux/chcat @@ -0,0 +1,35 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# chcat + +> Change SELinux security category for files. +> Categories provide an additional level of access control based on MCS (Multi-Category Security). +> See also: `chcon`, `semanage`. +> More information: . + +- List all available categories: + +`sudo chcat {{[-L|--list]}}` + +- Add a category to a file: + +`sudo chcat +{{CategoryName}} {{path/to/file}}` + +- Remove a category from a file: + +`sudo chcat -- -{{CategoryName}} {{path/to/file}}` + +- Set specific categories for a file (replacing existing ones): + +`sudo chcat {{CategoryName1,CategoryName2,...}} {{path/to/file}}` + +- Display the categories of a file: + +`ls {{[-Z|--context]}} {{path/to/file}}` + +- Remove all categories from a file: + +`sudo chcat {{[-d|--delete]}} {{path/to/file}}` diff --git a/tldr/linux/darling b/tldr/linux/darling index 05a26642..ae2232ad 100644 --- a/tldr/linux/darling +++ b/tldr/linux/darling @@ -12,9 +12,9 @@ source: https://github.com/tldr-pages/tldr.git `darling shell {{uname}}` -- Run a specific program in the current path with arguments: +- Run a specific program with arguments: -`darling shell {{./program}} {{program_argument_1 program_argument_2 ...}}` +`darling shell {{path/to/program}} {{program_argument_1 program_argument_2 ...}}` - Open a macOS shell: diff --git a/tldr/linux/debman b/tldr/linux/debman index cfbbf185..f247ce99 100644 --- a/tldr/linux/debman +++ b/tldr/linux/debman @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - Read a man page in a `.deb` [f]ile: -`debman -f {{path/to/filename.deb}} {{command}}` +`debman -f {{path/to/file.deb}} {{command}}` diff --git a/tldr/linux/gcrane-completion b/tldr/linux/gcrane-completion index 301f002f..f848c104 100644 --- a/tldr/linux/gcrane-completion +++ b/tldr/linux/gcrane-completion @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # gcrane completion > Generate the autocompletion script for gcrane for the specified shell. -> The available shells are `bash`, `fish`, `powershell`, and `zsh`. +> The available shells are Bash, fish, PowerShell, and Zsh. > More information: . - Generate the autocompletion script for your shell: @@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git `gcrane completion {{shell_name}} --no-descriptions` -- Load completions in your current shell session (bash/zsh): +- Load completions in your current shell session (Bash/Zsh): `source <(gcrane completion bash/zsh)` @@ -25,11 +25,11 @@ source: https://github.com/tldr-pages/tldr.git `gcrane completion fish | source` -- Load completions for every new session (bash): +- Load completions for every new session (Bash): `gcrane completion bash > /etc/bash_completion.d/gcrane` -- Load completions for every new session (zsh): +- Load completions for every new session (Zsh): `gcrane completion zsh > "${fpath[1]}/_gcrane"` diff --git a/tldr/linux/ip-rule b/tldr/linux/ip-rule index 0d37d8ec..7db98ed6 100644 --- a/tldr/linux/ip-rule +++ b/tldr/linux/ip-rule @@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git - Restore all rules from a file: -`sudo ip {{[ru|rule]}} {{[r|restore]}} < {{path/to/ip_rules.dat}}` +`sudo ip < {{path/to/ip_rules.dat}} {{[ru|rule]}} {{[r|restore]}}` diff --git a/tldr/linux/jobs b/tldr/linux/jobs index a52900ef..172056f3 100644 --- a/tldr/linux/jobs +++ b/tldr/linux/jobs @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # jobs > Shell builtin for viewing information about processes spawned by the current shell. -> Options other than `-l` and `-p` are exclusive to `bash`. +> Options other than `-l` and `-p` are exclusive to Bash. > More information: . - View jobs spawned by the current shell: diff --git a/tldr/linux/lxc-profile b/tldr/linux/lxc-profile index d8912d72..3a39d765 100644 --- a/tldr/linux/lxc-profile +++ b/tldr/linux/lxc-profile @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Edit a specific profile importing the configuration values from a file: -`lxc profile edit {{profile_name}} < {{config.yaml}}` +`lxc < {{config.yaml}} profile edit {{profile_name}}` - Launch a new container with specific profiles: diff --git a/tldr/linux/mhwd b/tldr/linux/mhwd index d64ebede..53bd3c3a 100644 --- a/tldr/linux/mhwd +++ b/tldr/linux/mhwd @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # mhwd -> Manjaro Hardware Detection utility . +> Manjaro Hardware Detection utility. > More information: . - List available drivers: diff --git a/tldr/linux/nixos-container b/tldr/linux/nixos-container index 47c4889f..8c5c9410 100644 --- a/tldr/linux/nixos-container +++ b/tldr/linux/nixos-container @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a NixOS container with a specific configuration file: -`sudo nixos-container create {{container_name}} --config-file {{nix_config_file_path}}` +`sudo nixos-container create {{container_name}} --config-file {{path/to/nix_config_file}}` - Start, stop, terminate, or destroy a specific container: diff --git a/tldr/linux/pct-exec b/tldr/linux/pct-exec index ef101759..f1716a7f 100644 --- a/tldr/linux/pct-exec +++ b/tldr/linux/pct-exec @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `pct {{[ex|exec]}} {{100}} {{command}}` -- Open a bash shell in a container: +- Open a Bash shell in a container: `pct {{[ex|exec]}} {{100}} bash` diff --git a/tldr/linux/pulseaudio-ctl b/tldr/linux/pulseaudio-ctl new file mode 100644 index 00000000..ab41d7ab --- /dev/null +++ b/tldr/linux/pulseaudio-ctl @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pulseaudio-ctl + +> Control PulseAudio volume. +> More information: . + +- Increase volume by 5%: + +`pulseaudio-ctl up` + +- Increase volume by a specific amount: + +`pulseaudio-ctl up {{amount}}` + +- Decrease volume by 5%: + +`pulseaudio-ctl down` + +- Decrease volume by a specific amount: + +`pulseaudio-ctl down {{amount}}` + +- Set volume to a specific percentage: + +`pulseaudio-ctl set {{percentage}}` + +- Set volume to a specific percentage if the current volume is higher than the provided value: + +`pulseaudio-ctl atmost {{percentage}}` + +- Toggle mute: + +`pulseaudio-ctl mute` + +- Toggle microphone mute: + +`pulseaudio-ctl mute-input` diff --git a/tldr/linux/scrun b/tldr/linux/scrun new file mode 100644 index 00000000..9d94f6b6 --- /dev/null +++ b/tldr/linux/scrun @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# scrun + +> An OCI runtime proxy for Slurm that runs containers as jobs. +> More information: . + +- Create a new container with a specific ID: + +`scrun create {{container_id}}` + +- Start a previously created container: + +`scrun start {{container_id}}` + +- Query the state of a container: + +`scrun state {{container_id}}` + +- Send a signal to a container (default: SIGTERM): + +`scrun kill {{container_id}}` + +- Send a specific signal to a container: + +`scrun kill {{container_id}} {{SIGKILL}}` + +- Delete a container and release its resources: + +`scrun delete {{container_id}}` + +- Enable debug logging: + +`scrun {{create|start|kill|delete}} {{container_id}} --debug` + +- Display version: + +`scrun --version` diff --git a/tldr/linux/sesearch b/tldr/linux/sesearch new file mode 100644 index 00000000..a8afbb7d --- /dev/null +++ b/tldr/linux/sesearch @@ -0,0 +1,35 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# sesearch + +> Search SELinux policy rules. +> Part of the `setools` package. +> See also: `seinfo`, `semodule`. +> More information: . + +- Search for all allow rules: + +`sesearch --allow` + +- Search for rules related to a specific type: + +`sesearch --allow {{[-t|--target]}} {{type_name}}` + +- Search for rules related to a specific source type: + +`sesearch --allow {{[-s|--source]}} {{source_type}}` + +- Search for rules that allow a specific class and permission: + +`sesearch --allow {{[-c|--class]}} {{class_name}} {{[-p|--perm]}} {{permission}}` + +- Search for rules with a specific target type and class: + +`sesearch --allow {{[-t|--target]}} {{type_name}} {{[-c|--class]}} {{class_name}}` + +- Display more detailed information about matched rules: + +`sesearch --allow {{[-t|--target]}} {{type_name}} {{[-v|--verbose]}}` diff --git a/tldr/linux/sfdisk b/tldr/linux/sfdisk index dbcbb2a0..9c7814f5 100644 --- a/tldr/linux/sfdisk +++ b/tldr/linux/sfdisk @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Restore a partition layout: -`sudo sfdisk {{path/to/device}} < {{path/to/file.dump}}` +`sudo sfdisk < {{path/to/file.dump}} {{path/to/device}}` - Set the type of a partition: diff --git a/tldr/linux/sqfstar b/tldr/linux/sqfstar index aec628e1..c8b540d2 100644 --- a/tldr/linux/sqfstar +++ b/tldr/linux/sqfstar @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Create a squashfs filesystem (compressed using `gzip` by default) from an uncompressed tar archive: -`sqfstar {{filesystem.squashfs}} < {{archive.tar}}` +`sqfstar < {{archive.tar}} {{filesystem.squashfs}}` - Create a squashfs filesystem from a tar archive compressed with `gzip`, and [comp]ress the filesystem using a specific algorithm: diff --git a/tldr/linux/systemctl-exit b/tldr/linux/systemctl-exit index e050181f..d64ddfa4 100644 --- a/tldr/linux/systemctl-exit +++ b/tldr/linux/systemctl-exit @@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git `systemctl exit {{code}} --user` -- Ask the container’s service manager to exit (equivalent of `systemctl poweroff` if not in a container): +- Ask the container's service manager to exit (equivalent of `systemctl poweroff` if not in a container): `systemctl exit` diff --git a/tldr/linux/unzipsfx b/tldr/linux/unzipsfx index cae68bf9..d1fc881c 100644 --- a/tldr/linux/unzipsfx +++ b/tldr/linux/unzipsfx @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Print content of a file in the self-extracting binary without extraction: -`{{./path/to/binary}} -c {{path/to/filename}}` +`{{./path/to/binary}} -c {{path/to/file}}` - Print comments on Zip archive in the self-extracting binary: diff --git a/tldr/lp b/tldr/lp index 6866bc12..0a943656 100644 --- a/tldr/lp +++ b/tldr/lp @@ -14,19 +14,19 @@ source: https://github.com/tldr-pages/tldr.git - Print a file to the default printer: -`lp {{path/to/filename}}` +`lp {{path/to/file}}` - Print a file to a named printer (see `lpstat` command): -`lp -d {{printer_name}} {{path/to/filename}}` +`lp -d {{printer_name}} {{path/to/file}}` - Print `n` copies of a file to the default printer: -`lp -n {{n}} {{path/to/filename}}` +`lp -n {{n}} {{path/to/file}}` - Print only certain pages to the default printer (print pages 1, 3-5, and 16): -`lp -P 1,3-5,16 {{path/to/filename}}` +`lp -P 1,3-5,16 {{path/to/file}}` - Resume printing a job: diff --git a/tldr/mail b/tldr/mail index c764e3e1..a727ad01 100644 --- a/tldr/mail +++ b/tldr/mail @@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Send an email that contains file content: -`mail --subject "{{$HOSTNAME filename.txt}}" {{to_user@example.com}} < {{path/to/filename.txt}}` +`mail < {{path/to/file.txt}} --subject "{{$HOSTNAME filename.txt}}" {{to_user@example.com}}` - Send a `tar.gz` file as an attachment: diff --git a/tldr/mailx b/tldr/mailx index d56db19c..02d117fb 100644 --- a/tldr/mailx +++ b/tldr/mailx @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Send mail with content read from a file: -`mailx {{[-s|--subject]}} "{{subject}}" {{to_addr}} < {{content.txt}}` +`mailx < {{content.txt}} {{[-s|--subject]}} "{{subject}}" {{to_addr}}` - Send mail to a recipient and CC to another address: diff --git a/tldr/mods b/tldr/mods index 8cf8655f..83127b84 100644 --- a/tldr/mods +++ b/tldr/mods @@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git - Ask for comments on your code, in markdown format: -`mods --format "{{what are your thoughts on improving this code?}}" < {{path/to/file}}` +`mods < {{path/to/file}} --format "{{what are your thoughts on improving this code?}}"` - Ask for help with your documentation, in markdown format: -`mods --format "{{write a new section to this readme for a feature that sends you a free rabbit if you hit r}}" < {{README.md}}` +`mods < {{README.md}} --format "{{write a new section to this readme for a feature that sends you a free rabbit if you hit r}}"` - Organize your videos, in markdown format: diff --git a/tldr/mvn-install b/tldr/mvn-install new file mode 100644 index 00000000..044dcf00 --- /dev/null +++ b/tldr/mvn-install @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# mvn install + +> Install third-party Maven dependencies and build the project. +> More information: . + +- Compile, test, package, and install the project into the local repository: + +`mvn install` + +- Skip tests during installation: + +`mvn install {{[-D|--define]}} skipTests` + +- Force update of dependencies before installing: + +`mvn install {{[-U|--update-snapshots]}}` + +- Skip test compilation and execution: + +`mvn install {{[-D|--define]}} maven.test.skip=true` diff --git a/tldr/mvn-site b/tldr/mvn-site index 649a6e52..0d4feba2 100644 --- a/tldr/mvn-site +++ b/tldr/mvn-site @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # mvn site > Generate a project website based on the information in the `pom.xml` file. -> More information: . +> More information: . - Generate a project site using the site plugin: diff --git a/tldr/mysql b/tldr/mysql index f2a39721..fd0d15c2 100644 --- a/tldr/mysql +++ b/tldr/mysql @@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git - Restore a database from a backup created with `mysqldump` (user will be prompted for a password): -`mysql {{[-u|--user]}} {{user}} {{[-p|--password]}} {{database_name}} < {{path/to/backup.sql}}` +`mysql < {{path/to/backup.sql}} {{[-u|--user]}} {{user}} {{[-p|--password]}} {{database_name}}` - Restore all databases from a backup (user will be prompted for a password): -`mysql {{[-u|--user]}} {{user}} {{[-p|--password]}} < {{path/to/backup.sql}}` +`mysql < {{path/to/backup.sql}} {{[-u|--user]}} {{user}} {{[-p|--password]}}` diff --git a/tldr/nc b/tldr/nc index 68e92354..2a3fc7d7 100644 --- a/tldr/nc +++ b/tldr/nc @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Start a listener on the specified TCP port and send a file into it: -`nc -l -p {{port}} < {{filename}}` +`nc < {{filename}} -l -p {{port}}` - Connect to a target listener on the specified port and receive a file from it: diff --git a/tldr/neo4j-admin b/tldr/neo4j-admin index ebf8093b..4cf1ef7e 100644 --- a/tldr/neo4j-admin +++ b/tldr/neo4j-admin @@ -31,7 +31,7 @@ source: https://github.com/tldr-pages/tldr.git - Load a database from a specified archive file through `stdin`: -`neo4j-admin database load --from-stdin {{database_name}} --overwrite-destination=true < {{path/to/filename.dump}}` +`neo4j-admin < {{path/to/file.dump}} database load --from-stdin {{database_name}} --overwrite-destination=true` - Display help: diff --git a/tldr/nix-build.3 b/tldr/nix-build.3 index f234c925..14b022a7 100644 --- a/tldr/nix-build.3 +++ b/tldr/nix-build.3 @@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Build the default package from a flake in some directory: -`nix build {{./path/to/directory}}` +`nix build {{path/to/directory}}` - Build a package without making the `result` symlink, instead printing the store path to the `stdout`: diff --git a/tldr/nix-profile b/tldr/nix-profile index a4d75c6b..5a548fa5 100644 --- a/tldr/nix-profile +++ b/tldr/nix-profile @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Install a package from a flake on GitHub into a custom profile: -`nix profile install {{github:owner/repo/pkg}} --profile {{./path/to/directory}}` +`nix profile install {{github:owner/repo/pkg}} --profile {{path/to/directory}}` - List packages currently installed in the default profile: diff --git a/tldr/osx/gcrane-completion b/tldr/osx/gcrane-completion index 6112a6fd..7c681c26 100644 --- a/tldr/osx/gcrane-completion +++ b/tldr/osx/gcrane-completion @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # gcrane completion > Generate the autocompletion script for gcrane for the specified shell. -> The available shells are `bash`, `fish`, `powershell`, and `zsh`. +> The available shells are Bash, fish, PowerShell, and Zsh. > More information: . - Generate the autocompletion script for your shell: @@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git `gcrane completion {{shell_name}} --no-descriptions` -- Load completions in your current shell session (bash/zsh): +- Load completions in your current shell session (Bash/Zsh): `source <(gcrane completion bash/zsh)` @@ -25,11 +25,11 @@ source: https://github.com/tldr-pages/tldr.git `gcrane completion fish | source` -- Load completions for every new session (bash): +- Load completions for every new session (Bash): `gcrane completion bash > $(brew --prefix)/etc/bash_completion.d/gcrane` -- Load completions for every new session (zsh): +- Load completions for every new session (Zsh): `gcrane completion zsh > $(brew --prefix)/share/zsh/site-functions/_gcrane` diff --git a/tldr/osx/pkgutil b/tldr/osx/pkgutil index 0458f2da..c594e479 100644 --- a/tldr/osx/pkgutil +++ b/tldr/osx/pkgutil @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Verify cryptographic signatures of a package file: -`pkgutil --check-signature {{path/to/filename.pkg}}` +`pkgutil --check-signature {{path/to/file.pkg}}` - List all the files for an installed package given its ID: @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Extract the contents of a package file into a directory: -`pkgutil --expand-full {{path/to/filename.pkg}} {{path/to/directory}}` +`pkgutil --expand-full {{path/to/file.pkg}} {{path/to/directory}}` diff --git a/tldr/pageres b/tldr/pageres index 9d0ec7bf..26e2ce8c 100644 --- a/tldr/pageres +++ b/tldr/pageres @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Capture a screenshot of a local file: -`pageres {{local_file_path.html}} {{1366x768}}` +`pageres {{path/to/local_file.html}} {{1366x768}}` diff --git a/tldr/pampick b/tldr/pampick index 357e2a2f..47863b7b 100644 --- a/tldr/pampick +++ b/tldr/pampick @@ -11,4 +11,4 @@ source: https://github.com/tldr-pages/tldr.git - Execute a shell command on each image in a Netpbm file: -`pampick {{image_number1 image_number2 ...}} < {{path/to/image.pam}} > {{path/to/output.pam}}` +`pampick < {{path/to/image.pam}} {{image_number1 image_number2 ...}} > {{path/to/output.pam}}` diff --git a/tldr/pamshadedrelief b/tldr/pamshadedrelief index 62276fed..25cbc329 100644 --- a/tldr/pamshadedrelief +++ b/tldr/pamshadedrelief @@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git - Gamma adjust the image by the specified factor: -`pamshadedrelief {{[-g|-gamma]}} {{factor}} < {{path/to/input.pam}} > {{path/to/output.pam}}` +`pamshadedrelief < {{path/to/input.pam}} {{[-g|-gamma]}} {{factor}} > {{path/to/output.pam}}` diff --git a/tldr/papermc b/tldr/papermc index 026de329..74f750c1 100644 --- a/tldr/papermc +++ b/tldr/papermc @@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git - Restore world data from a backup: -`papermc restore {{path/to/filename}}` +`papermc restore {{path/to/file}}` - Display help: diff --git a/tldr/patch b/tldr/patch index 8631c0c2..dafbbf08 100644 --- a/tldr/patch +++ b/tldr/patch @@ -15,16 +15,16 @@ source: https://github.com/tldr-pages/tldr.git - Apply a patch to a specific file: -`patch {{path/to/file}} < {{patch.diff}}` +`patch < {{patch.diff}} {{path/to/file}}` - Patch a file writing the result to a different file: -`patch {{path/to/input_file}} {{[-o|--output]}} {{path/to/output_file}} < {{patch.diff}}` +`patch < {{patch.diff}} {{path/to/input_file}} {{[-o|--output]}} {{path/to/output_file}}` - Apply a patch to the current directory: -`patch {{[-p|--strip]}} 1 < {{patch.diff}}` +`patch < {{patch.diff}} {{[-p|--strip]}} 1` - Apply the reverse of a patch: -`patch {{[-R|--reverse]}} < {{patch.diff}}` +`patch < {{patch.diff}} {{[-R|--reverse]}}` diff --git a/tldr/pbmtobbnbg b/tldr/pbmtobbnbg index 91c0c03c..28e36834 100644 --- a/tldr/pbmtobbnbg +++ b/tldr/pbmtobbnbg @@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git - Specify the rasterop: -`pbmtobbnbg {{3}} < {{path/to/image.pbm}} > {{path/to/output.dpd}}` +`pbmtobbnbg < {{path/to/image.pbm}} {{3}} > {{path/to/output.dpd}}` diff --git a/tldr/protoc b/tldr/protoc index fc401a41..99becc8e 100644 --- a/tldr/protoc +++ b/tldr/protoc @@ -22,12 +22,12 @@ source: https://github.com/tldr-pages/tldr.git - Encode a text-format message into a protocol message from a `.proto` file: -`protoc --encode={{TypeName}} {{input_file.proto}} < {{message.txt}}` +`protoc < {{message.txt}} --encode={{TypeName}} {{input_file.proto}}` - Decode a protocol message into text-format from a `.proto` file: -`protoc --decode={{TypeName}} {{input_file.proto}} < {{message.bin}}` +`protoc < {{message.bin}} --decode={{TypeName}} {{input_file.proto}}` - Decode a protocol message into raw tag/value pairs: -`protoc --decode_raw < {{message.bin}}` +`protoc < {{message.bin}} --decode_raw` diff --git a/tldr/pulumi-gen-completion b/tldr/pulumi-gen-completion index aca26963..1ce726d3 100644 --- a/tldr/pulumi-gen-completion +++ b/tldr/pulumi-gen-completion @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # pulumi gen-completion > Generate completion scripts for the Pulumi CLI. -> Supported shells are bash, zsh, fish. +> Supported shells are Bash, Zsh, fish. > More information: . - Generate completion scripts: diff --git a/tldr/puppet b/tldr/puppet index c1a220e1..182f52ef 100644 --- a/tldr/puppet +++ b/tldr/puppet @@ -5,22 +5,35 @@ source: https://github.com/tldr-pages/tldr.git --- # puppet -> Help to manage and automate the configuration of servers. -> Some subcommands such as `agent` have their own usage documentation. +> Manage and automate the configuration of servers. +> Puppet uses a declarative language to define system configurations and apply them automatically. +> Some subcommands, such as `agent` and `apply`, have their own usage documentation. > More information: . -- Execute a Puppet subcommand: +- Apply a Puppet manifest file to configure the system: -`puppet {{subcommand}}` +`puppet apply {{path/to/file.pp}}` -- Display help: +- Apply a manifest in no operation (dry-run) mode to preview changes: -`puppet --help` +`puppet apply --noop {{path/to/file.pp}}` -- Display help for a subcommand: +- Validate the syntax of a Puppet manifest: + +`puppet parser validate {{path/to/file.pp}}` + +- Run the Puppet agent to fetch and apply configurations from the master: + +`puppet agent {{[-t|--test]}}` + +- Display help for a specific subcommand: `puppet help {{subcommand}}` +- Display general help: + +`puppet {{[-h|--help]}}` + - Display version: -`puppet --version` +`puppet {{[-V|--version]}}` diff --git a/tldr/pygbag b/tldr/pygbag new file mode 100644 index 00000000..b2bbe8b3 --- /dev/null +++ b/tldr/pygbag @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# pygbag + +> Package Pygame projects as WebAssembly to run in web browsers. +> More information: . + +- Package a Pygame project and start a local test server: + +`pygbag {{path/to/project_folder}}` + +- Package using Python module syntax: + +`python -m pygbag {{path/to/project_folder}}` + +- Package and build without starting the test server: + +`pygbag {{path/to/project_folder}} --build` + +- Package with a specific template: + +`pygbag {{path/to/project_folder}} --template {{template_name.tmpl}}` + +- Package and create a ZIP archive for : + +`pygbag {{path/to/project_folder}} --archive` + +- Package with optimization turned off: + +`pygbag {{path/to/project_folder}} --no_opt` + +- Specify a custom port for the test server: + +`pygbag {{path/to/project_folder}} --port {{8080}}` + +- Display help: + +`pygbag {{[-h|--help]}}` diff --git a/tldr/quilt b/tldr/quilt index 60531e55..6097a884 100644 --- a/tldr/quilt +++ b/tldr/quilt @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Import an existing patch from a file: -`quilt import {{path/to/filename.patch}}` +`quilt import {{path/to/file.patch}}` - Create a new patch: diff --git a/tldr/rdiff-backup b/tldr/rdiff-backup index 04c40409..bcd14bb5 100644 --- a/tldr/rdiff-backup +++ b/tldr/rdiff-backup @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Restore backed up files as they were 3 days ago: -`rdiff-backup restore --at 3D {{path/to/backup}} {{path/to/destination}}` +`rdiff-backup restore --at 3D {{path/to/backup}} {{path/to/destination}}` diff --git a/tldr/readarray b/tldr/readarray index 03fbaba8..a587a60b 100644 --- a/tldr/readarray +++ b/tldr/readarray @@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git - Read lines from a file and insert them in an array: -`readarray {{array_name}} < {{path/to/file.txt}}` +`readarray < {{path/to/file.txt}} {{array_name}}` - Remove trailing deliminators (newline by default): -`readarray -t {{array_name}} < {{path/to/file.txt}}` +`readarray < {{path/to/file.txt}} -t {{array_name}}` - Copy at most `n` lines: -`readarray -n {{n}} {{array_name}} < {{path/to/file.txt}}` +`readarray < {{path/to/file.txt}} -n {{n}} {{array_name}}` - Display help: diff --git a/tldr/scheme b/tldr/scheme index 06b92d6e..3cedaba6 100644 --- a/tldr/scheme +++ b/tldr/scheme @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Run a scheme program (with no REPL output): -`scheme --quiet < {{script.scm}}` +`scheme < {{script.scm}} --quiet` - Load a scheme program into the REPL: diff --git a/tldr/sendmail b/tldr/sendmail index 735d43ec..a2744fed 100644 --- a/tldr/sendmail +++ b/tldr/sendmail @@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git - Send a message with the content of `message.txt` to the mail directory of local user `username`: -`sendmail {{username}} < {{message.txt}}` +`sendmail < {{message.txt}} {{username}}` - Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the message in `message.txt`: -`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{message.txt}}` +`sendmail < {{message.txt}} -f {{you@yourdomain.com}} {{test@gmail.com}}` - Send an email from you@yourdomain.com (assuming the mail server is configured for this) to test@gmail.com containing the file `file.zip`: -`sendmail -f {{you@yourdomain.com}} {{test@gmail.com}} < {{file.zip}}` +`sendmail < {{file.zip}} -f {{you@yourdomain.com}} {{test@gmail.com}}` diff --git a/tldr/stl2gts b/tldr/stl2gts index 520a2100..05b86432 100644 --- a/tldr/stl2gts +++ b/tldr/stl2gts @@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git - Convert an STL file to a GTS file and revert face normals: -`stl2gts --revert < {{path/to/file.stl}} > {{path/to/file.gts}}` +`stl2gts < {{path/to/file.stl}} --revert > {{path/to/file.gts}}` - Convert an STL file to a GTS file and do not merge vertices: -`stl2gts --nomerge < {{path/to/file.stl}} > {{path/to/file.gts}}` +`stl2gts < {{path/to/file.stl}} --nomerge > {{path/to/file.gts}}` - Convert an STL file to a GTS file and display surface statistics: -`stl2gts --verbose < {{path/to/file.stl}} > {{path/to/file.gts}}` +`stl2gts < {{path/to/file.stl}} --verbose > {{path/to/file.gts}}` - Display help: diff --git a/tldr/tesseract b/tldr/tesseract index 164f8734..943d21e4 100644 --- a/tldr/tesseract +++ b/tldr/tesseract @@ -8,9 +8,9 @@ source: https://github.com/tldr-pages/tldr.git > OCR (Optical Character Recognition) engine. > More information: . -- Recognize text in an image and save it to `output.txt` (the `.txt` extension is added automatically): +- Recognize text in an image and save it to the given path (a `.txt` extension is added automatically): -`tesseract {{path/to/image.png}} output` +`tesseract {{path/to/image.png}} {{path/to/output_file}}` - Specify a custom [l]anguage (default is English) with an ISO 639-2 code (e.g. deu = Deutsch = German): diff --git a/tldr/tgpt b/tldr/tgpt index 1be9d96f..b6daf060 100644 --- a/tldr/tgpt +++ b/tldr/tgpt @@ -39,4 +39,4 @@ source: https://github.com/tldr-pages/tldr.git - Feed a file as additional pre-prompt input: -`tgpt --provider {{blackboxai}} "{{prompt}}" < {{path/to/file}}` +`tgpt < {{path/to/file}} --provider {{blackboxai}} "{{prompt}}"` diff --git a/tldr/tr b/tldr/tr index e6ede6fb..6c930d92 100644 --- a/tldr/tr +++ b/tldr/tr @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Replace all occurrences of a character in a file, and print the result: -`tr {{find_character}} {{replace_character}} < {{path/to/file}}` +`tr < {{path/to/file}} {{find_character}} {{replace_character}}` - Replace all occurrences of a character from another command's output: @@ -18,20 +18,20 @@ source: https://github.com/tldr-pages/tldr.git - Map each character of the first set to the corresponding character of the second set: -`tr '{{abcd}}' '{{jkmn}}' < {{path/to/file}}` +`tr < {{path/to/file}} '{{abcd}}' '{{jkmn}}'` - Delete all occurrences of the specified set of characters from the input: -`tr {{[-d|--delete]}} '{{input_characters}}' < {{path/to/file}}` +`tr < {{path/to/file}} {{[-d|--delete]}} '{{input_characters}}'` - Compress a series of identical characters to a single character: -`tr {{[-s|--squeeze-repeats]}} '{{input_characters}}' < {{path/to/file}}` +`tr < {{path/to/file}} {{[-s|--squeeze-repeats]}} '{{input_characters}}'` - Translate the contents of a file to upper-case: -`tr "[:lower:]" "[:upper:]" < {{path/to/file}}` +`tr < {{path/to/file}} "[:lower:]" "[:upper:]"` - Strip out non-printable characters from a file: -`tr {{[-cd|--complement --delete]}} "[:print:]" < {{path/to/file}}` +`tr < {{path/to/file}} {{[-cd|--complement --delete]}} "[:print:]"` diff --git a/tldr/vboxmanage-export b/tldr/vboxmanage-export index 885b5051..df07a051 100644 --- a/tldr/vboxmanage-export +++ b/tldr/vboxmanage-export @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify the target OVA file: -`VBoxManage export --output {{path/to/filename.ova}}` +`VBoxManage export --output {{path/to/file.ova}}` - Export in OVF 0.9 legacy mode: diff --git a/tldr/vboxmanage-registervm b/tldr/vboxmanage-registervm index 201c412e..772b18b1 100644 --- a/tldr/vboxmanage-registervm +++ b/tldr/vboxmanage-registervm @@ -10,12 +10,12 @@ source: https://github.com/tldr-pages/tldr.git - Register an existing VM: -`VBoxManage registervm {{path/to/filename.vbox}}` +`VBoxManage registervm {{path/to/file.vbox}}` - Supply the encryption password file of the VM: -`VBoxManage registervm {{path/to/filename.vbox}} --password {{path/to/password_file}}` +`VBoxManage registervm {{path/to/file.vbox}} --password {{path/to/password_file}}` - Prompt for the encryption password on the command-line: -`VBoxManage registervm {{path/to/filename.vbox}} --password -` +`VBoxManage registervm {{path/to/file.vbox}} --password -` diff --git a/tldr/windows/choco b/tldr/windows/choco index 4f81aaaa..88efc9d7 100644 --- a/tldr/windows/choco +++ b/tldr/windows/choco @@ -6,21 +6,37 @@ source: https://github.com/tldr-pages/tldr.git # choco > The Chocolatey package manager. -> Some subcommands such as `install` have their own usage documentation. +> Some subcommands such as `install`, `upgrade`, `pin` have their own usage documentation. > More information: . -- Execute a Chocolatey command: +- Install a package: -`choco {{command}}` +`choco install {{package_name}}` -- Display help: +- Upgrade a specific installed package: -`choco {{[-h|--help]}}` +`choco upgrade {{package_name}}` -- Display help for a specific command: +- Upgrade all outdated packages and automatically confirm all prompts: -`choco {{command}} {{[-h|--help]}}` +`choco upgrade all {{[-y|--yes]}}` -- Display version: +- Uninstall a package and automatically confirm all prompts: -`choco --version` +`choco uninstall {{package_name}} {{[-y|--yes]}}` + +- Search for packages by name or keyword: + +`choco search {{query}}` + +- List all packages installed on the machine: + +`choco list` + +- Show packages that have newer versions available: + +`choco outdated` + +- Install a package from a specific source: + +`choco install {{package_name}} {{[-s|--source]}} {{source}}` diff --git a/tldr/windows/cl b/tldr/windows/cl index 5987f6d2..2faef91b 100644 --- a/tldr/windows/cl +++ b/tldr/windows/cl @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify the output directory for compiled files: -`cl /Fo {{path/to/output_directory/}} {{path/to/source.c}}` +`cl /Fo {{path/to/output_directory}}/ {{path/to/source.c}}` - Compile with warnings as errors: diff --git a/tldr/windows/gcrane-completion b/tldr/windows/gcrane-completion index 4f81817e..b0011419 100644 --- a/tldr/windows/gcrane-completion +++ b/tldr/windows/gcrane-completion @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # gcrane completion > Generate the autocompletion script for gcrane for the specified shell. -> The available shells are `bash`, `fish`, `powershell`, and `zsh`. +> The available shells are Bash, fish, PowerShell, and Zsh. > More information: . - Generate the autocompletion script for your shell: @@ -17,11 +17,11 @@ source: https://github.com/tldr-pages/tldr.git `gcrane completion {{shell_name}} --no-descriptions` -- Load completions in your current shell session (powershell): +- Load completions in your current shell session (PowerShell): `gcrane completion powershell | Out-String | Invoke-Expression` -- Load completions for every new session (powershell): +- Load completions for every new session (PowerShell): `gcrane completion powershell | Out-String | Invoke-Expression` diff --git a/tldr/zinit b/tldr/zinit index 6d62767a..a8cfb860 100644 --- a/tldr/zinit +++ b/tldr/zinit @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # zinit -> Flexible and blazing fast `zsh` plugin manager. +> Flexible and blazing fast Zsh plugin manager. > More information: . - Show all installed plugins: diff --git a/tldr/zlib-flate b/tldr/zlib-flate index 33c2b47a..944e9363 100644 --- a/tldr/zlib-flate +++ b/tldr/zlib-flate @@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git - Compress a file: -`zlib-flate -compress < {{path/to/input_file}} > {{path/to/compressed.zlib}}` +`zlib-flate < {{path/to/input_file}} -compress > {{path/to/compressed.zlib}}` - Uncompress a file: -`zlib-flate -uncompress < {{path/to/compressed.zlib}} > {{path/to/output_file}}` +`zlib-flate < {{path/to/compressed.zlib}} -uncompress > {{path/to/output_file}}` - Compress a file with a specified compression level. 0=Fastest (Worst), 9=Slowest (Best): -`zlib-flate -compress={{compression_level}} < {{path/to/input_file}} > {{path/to/compressed.zlib}}` +`zlib-flate < {{path/to/input_file}} -compress={{compression_level}} > {{path/to/compressed.zlib}}`