diff --git a/tldr/arthas-watch b/tldr/arthas-watch index 3c1776a6..97d1e689 100644 --- a/tldr/arthas-watch +++ b/tldr/arthas-watch @@ -11,12 +11,12 @@ source: https://github.com/tldr-pages/tldr.git - Observe the first parameter and return value of method, and expand the nested attributes of the object to 4 levels: -`watch {{class-pattern}} {{method-pattern}} {{'{ params[0],returnObj }'}} -x 4` +`watch {{class-pattern}} {{method-pattern}} '{{{ params[0],returnObj }}}' -x 4` - When the value of the first parameter of the method is 5, the second parameter and return value are output, and the object is expanded 4 layers: -`watch {{class-pattern}} {{method-pattern}} {{'{ params[1],returnObj }'}} {{'"5".equals(params[0])'}} -x 4` +`watch {{class-pattern}} {{method-pattern}} '{{{ params[1],returnObj }}}' '{{"5".equals(params[0])}}' -x 4` - When the method returns or an exception occurs, observe the count property of the second parameter: -`watch {{class-pattern}} {{method-pattern}} {{'{ params[1].count }'}} -e -s` +`watch {{class-pattern}} {{method-pattern}} '{{{ params[1].count }}}' -e -s` diff --git a/tldr/babeld b/tldr/babeld index 3abd7c3c..2b59b9d7 100644 --- a/tldr/babeld +++ b/tldr/babeld @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify a [C]onfiguration command: -`babeld -C {{'redistribute metric 256'}}` +`babeld -C '{{redistribute metric 256}}'` - Specify on which interfaces to operate: diff --git a/tldr/brew-reinstall b/tldr/brew-reinstall new file mode 100644 index 00000000..aac5ac4a --- /dev/null +++ b/tldr/brew-reinstall @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# brew reinstall + +> Uninstall and then reinstall a formula or cask using the same options it was originally installed with. +> More information: . + +- Reinstall a formula/cask: + +`brew reinstall {{formula|cask}}` + +- Reinstall a formula/cask and show verification and post-install steps: + +`brew reinstall {{[-v|--verbose]}} {{formula|cask}}` + +- Make some output more quiet: + +`brew reinstall {{[-q|--quiet]}} {{formula|cask}}` + +- Display help: + +`brew reinstall {{[-h|--help]}}` diff --git a/tldr/buzzphrase b/tldr/buzzphrase index 9a205e89..62eb1d9e 100644 --- a/tldr/buzzphrase +++ b/tldr/buzzphrase @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - Print a phrase formatted as [i]mperative verb + past tense [v]erb + [a]djective + plural [N]oun: -`buzzphrase {{'{i} {v} {a} {N}'}}` +`buzzphrase '{{{i} {v} {a} {N}}}'` - Print `k` phrases formatted as present participle [V]erb + [a]djective + singular [n]oun + [f]inal: -`buzzphrase {{k}} {{'{V} {a} {n} {f}'}}` +`buzzphrase {{k}} '{{{V} {a} {n} {f}}}'` diff --git a/tldr/case b/tldr/case index 6087cfd8..f621533e 100644 --- a/tldr/case +++ b/tldr/case @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Continue to the next pattern's commands without checking the pattern: -`case {{$ANIMAL}} in {{cat}}) echo {{"It's a cat"}} ;& {{dog}}) {{echo "It's either a dog or cat fell through"}} ;& *) {{echo "Fallback"}} ;; esac` +`case {{$ANIMAL}} in {{cat}}) {{echo "It's a cat"}} ;& {{dog}}) {{echo "It's either a dog or cat fell through"}} ;& *) {{echo "Fallback"}} ;; esac` - Display help: diff --git a/tldr/cli53 b/tldr/cli53 index cd46ca20..8fb2657d 100644 --- a/tldr/cli53 +++ b/tldr/cli53 @@ -22,19 +22,19 @@ source: https://github.com/tldr-pages/tldr.git - Create a `www` subdomain pointing to a relative record in the same zone: -`cli53 {{[rc|rrcreate]}} {{example.com}} {{'www 300 CNAME lb'}}` +`cli53 {{[rc|rrcreate]}} {{example.com}} '{{www 300 CNAME lb}}'` - Create a `www` subdomain pointing to an external address (must end with a dot): -`cli53 {{[rc|rrcreate]}} {{example.com}} {{'www 300 CNAME lb.example.com.'}}` +`cli53 {{[rc|rrcreate]}} {{example.com}} '{{www 300 CNAME lb.example.com.}}'` - Create a `www` subdomain pointing to an IP address: -`cli53 {{[rc|rrcreate]}} {{example.com}} {{'www 300 A 150.130.110.1'}}` +`cli53 {{[rc|rrcreate]}} {{example.com}} '{{www 300 A 150.130.110.1}}'` - Replace a `www` subdomain pointing to a different IP: -`cli53 {{[rc|rrcreate]}} --replace {{'www 300 A 150.130.110.2'}}` +`cli53 {{[rc|rrcreate]}} --replace '{{www 300 A 150.130.110.2}}'` - Delete a record A: diff --git a/tldr/curl b/tldr/curl index 78fc8d65..5e31c7f2 100644 --- a/tldr/curl +++ b/tldr/curl @@ -24,15 +24,15 @@ source: https://github.com/tldr-pages/tldr.git - Send form-encoded data (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`: -`curl {{[-X|--request]}} POST {{[-d|--data]}} {{'name=bob'}} {{http://example.com/form}}` +`curl {{[-X|--request]}} POST {{[-d|--data]}} '{{name=bob}}' {{http://example.com/form}}` - Send a request with an extra header, using a custom HTTP method and over a proxy (such as BurpSuite), ignoring insecure self-signed certificates: -`curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} {{'Authorization: Bearer token'}} {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}` +`curl {{[-k|--insecure]}} {{[-x|--proxy]}} {{http://127.0.0.1:8080}} {{[-H|--header]}} '{{Authorization: Bearer token}}' {{[-X|--request]}} {{GET|PUT|POST|DELETE|PATCH|...}} {{https://example.com}}` - Send data in JSON format, specifying the appropriate Content-Type header: -`curl {{[-d|--data]}} {{'{"name":"bob"}'}} {{[-H|--header]}} {{'Content-Type: application/json'}} {{http://example.com/users/1234}}` +`curl {{[-d|--data]}} '{{{"name":"bob"}}}' {{[-H|--header]}} '{{Content-Type: application/json}}' {{http://example.com/users/1234}}` - Pass client certificate and private key for the request, skipping certificate validation: diff --git a/tldr/dalfox b/tldr/dalfox index 38412234..328f3295 100644 --- a/tldr/dalfox +++ b/tldr/dalfox @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Scan a URL using a header for authentication: -`dalfox url {{http://example.com}} {{[-H|--header]}} {{'X-My-Header: 123'}}` +`dalfox url {{http://example.com}} {{[-H|--header]}} '{{X-My-Header: 123}}'` - Scan a list of URLs from a file: diff --git a/tldr/dockdiver b/tldr/dockdiver index 0bfedbe7..fe76a549 100644 --- a/tldr/dockdiver +++ b/tldr/dockdiver @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Add custom headers as JSON (e.g., '{"X-Custom": "Value"}'): -`dockdiver -url {{https://example.com}} -list -headers {{'{"X-Custom": "Value"}'}}` +`dockdiver -url {{https://example.com}} -list -headers '{{{"X-Custom": "Value"}}}'` diff --git a/tldr/du b/tldr/du index 1718cb8b..438bead1 100644 --- a/tldr/du +++ b/tldr/du @@ -24,13 +24,13 @@ source: https://github.com/tldr-pages/tldr.git `du {{[-ah|--all --human-readable]}} {{path/to/directory}}` -- List the human-readable sizes of a directory and any subdirectories, up to N levels deep: +- List the human-readable sizes of a directory and any subdirectories, up to `n` levels deep: -`du {{[-h|--human-readable]}} {{[-d|--max-depth]}} N {{path/to/directory}}` +`du {{[-h|--human-readable]}} {{[-d|--max-depth]}} {{n}} {{path/to/directory}}` - List the human-readable size of all `.jpg` files in current directory, and show a cumulative total at the end: -`du {{[-ch|--total --human-readable]}} {{./*.jpg}}` +`du {{[-ch|--total --human-readable]}} *.jpg` - List all files and directories (including hidden ones) above a certain threshold size (useful for investigating what is actually taking up the space): diff --git a/tldr/entr b/tldr/entr index 96283da6..e286cdae 100644 --- a/tldr/entr +++ b/tldr/entr @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Rebuild and test with `make` if any `.c` source files in the current directory change: -`{{ls *.c}} | entr {{'make && make test'}}` +`{{ls *.c}} | entr '{{make && make test}}'` - Send a `SIGTERM` to any previously spawned ruby subprocesses before executing `ruby main.rb`: @@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git - Rebuild the project if source files change, limiting output to the first few lines: -`{{find src/}} | entr -s {{'make | sed 10q'}}` +`{{find src/}} | entr -s '{{make | sed 10q}}'` - Launch and auto-[r]eload a Node.js server: diff --git a/tldr/ern b/tldr/ern index 6b9a7469..bf69db98 100644 --- a/tldr/ern +++ b/tldr/ern @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Publish an Electrode Native container to a local Maven repository: -`ern publish-container --publisher {{maven}} --platform {{android}} --extra {{'{"groupId":"com.walmart.ern","artifactId":"quickstart"}'}}` +`ern publish-container --publisher {{maven}} --platform {{android}} --extra '{{{"groupId":"com.walmart.ern","artifactId":"quickstart"}}}'` - Transform an iOS container into a pre-compiled binary framework: diff --git a/tldr/exiv2 b/tldr/exiv2 index d7eb2dbc..f70ccc76 100644 --- a/tldr/exiv2 +++ b/tldr/exiv2 @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Rename the file, prepending the date and time from metadata (not from the file timestamp): -`exiv2 {{[-r|--rename]}} {{'%Y%m%d_%H%M%S_:basename:'}} {{path/to/file}}` +`exiv2 {{[-r|--rename]}} '{{%Y%m%d_%H%M%S_:basename:}}' {{path/to/file}}` diff --git a/tldr/fastmod b/tldr/fastmod index fb4349cf..099c69ef 100644 --- a/tldr/fastmod +++ b/tldr/fastmod @@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Replace a `regex` in a specific directory in files filtered with a case-insensitive glob pattern: -`fastmod {{regex}} {{replacement}} --dir {{path/to/directory}} --iglob {{'**/*.{js,json}'}}` +`fastmod {{regex}} {{replacement}} --dir {{path/to/directory}} --iglob '{{**/*.{js,json}}}'` - Replace for an exact string in `.js` or JSON files: diff --git a/tldr/fc b/tldr/fc index 867bb12a..bcef6395 100644 --- a/tldr/fc +++ b/tldr/fc @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Specify an editor to open with: -`fc -e {{'emacs'}}` +`fc -e '{{emacs}}'` - List recent commands from history: diff --git a/tldr/flask-unsign b/tldr/flask-unsign index a3215f8b..60966339 100644 --- a/tldr/flask-unsign +++ b/tldr/flask-unsign @@ -26,11 +26,11 @@ source: https://github.com/tldr-pages/tldr.git - Sign a new session cookie with a secret key: -`flask-unsign {{[-s|--sign]}} {{[-c|--cookie]}} {{"{'logged_in': False}"}} {{[-S|--secret]}} {{secret}}` +`flask-unsign {{[-s|--sign]}} {{[-c|--cookie]}} "{{{'logged_in': False}}}" {{[-S|--secret]}} {{secret}}` - Sign a session cookie using legacy timestamp (useful for old versions): -`flask-unsign {{[-s|--sign]}} {{[-c|--cookie]}} {{"{'logged_in': False}"}} {{[-S|--secret]}} {{secret}} {{[-l|--legacy]}}` +`flask-unsign {{[-s|--sign]}} {{[-c|--cookie]}} "{{{'logged_in': False}}}" {{[-S|--secret]}} {{secret}} {{[-l|--legacy]}}` - Brute-force a session cookie with custom threads and no literal evaluation: diff --git a/tldr/fselect b/tldr/fselect index c0194b4b..870aeb69 100644 --- a/tldr/fselect +++ b/tldr/fselect @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - Select full path and size from temporary or configuration files in a given directory: -`fselect size, path from {{path/to/directory}} where name = {{'*.cfg'}} or name = {{'*.tmp'}}` +`fselect size, path from {{path/to/directory}} where name = '{{*.cfg}}' or name = {{'*.tmp'}}` - Find square images: diff --git a/tldr/git-lfs-transfer b/tldr/git-lfs-transfer new file mode 100644 index 00000000..b2da5bc7 --- /dev/null +++ b/tldr/git-lfs-transfer @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# git-lfs-transfer + +> Server-side implementation of the Git LFS pure SSH transfer protocol. +> Allows Git LFS to upload and download large files over SSH instead of HTTPS. +> More information: . + +- Upload large files tracked by Git LFS to a repository: + +`git-lfs-transfer {{path/to/repo.git}} upload` + +- Download large files tracked by Git LFS from a repository: + +`git-lfs-transfer {{path/to/repo.git}} download` diff --git a/tldr/git-log b/tldr/git-log index 172cf8af..91e0f01a 100644 --- a/tldr/git-log +++ b/tldr/git-log @@ -32,9 +32,9 @@ source: https://github.com/tldr-pages/tldr.git `git log {{[-i|--regexp-ignore-case]}} --grep {{search_string}}` -- Show the last N number of commits from a certain author: +- Show the last `n` number of commits from a certain author: -`git log {{[-n|--max-count]}} {{number}} --author "{{author}}"` +`git log {{[-n|--max-count]}} {{n}} --author "{{author}}"` - Show commits between two dates (yyyy-mm-dd): diff --git a/tldr/git-merge-index b/tldr/git-merge-index new file mode 100644 index 00000000..3f532667 --- /dev/null +++ b/tldr/git-merge-index @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# git merge-index + +> Run a merge program on files that need merging. +> More information: . + +- Merge all files needing resolution using the standard helper: + +`git merge-index git-merge-one-file -a` + +- Merge a specific file: + +`git merge-index git-merge-one-file -- {{path/to/file}}` + +- Merge multiple files, continuing on failures: + +`git merge-index -o git-merge-one-file -- {{path/to/file1 path/to/file2 ...}}` + +- Quietly merge all files with a custom program: + +`git merge-index -q {{merge-program}} -a` + +- Inspect merge inputs for a file using `cat`: + +`git merge-index cat -- {{path}}` diff --git a/tldr/git-merge-one-file b/tldr/git-merge-one-file new file mode 100644 index 00000000..c7bc83c6 --- /dev/null +++ b/tldr/git-merge-one-file @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# git merge-one-file + +> Resolve a single file merge after a trivial merge. +> More information: . + +- Resolve a simple merge conflict for a file: + +`git merge-one-file {{path/to/file}}` + +- Use as a helper in merge-index for a file: + +`git merge-index git-merge-one-file {{path/to/file}}` + +- Handle a binary file merge: + +`git merge-one-file -p {{path/to/file}}` + +- Apply after read-tree in a scripted merge: + +`git read-tree -m {{branch1}} {{branch2}} && git merge-index git-merge-one-file {{path/to/file}}` diff --git a/tldr/git-p4 b/tldr/git-p4 new file mode 100644 index 00000000..bc873bd3 --- /dev/null +++ b/tldr/git-p4 @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# git p4 + +> Import from and submit to Perforce repositories. +> More information: . + +- Clone a Perforce depot into a new Git repository: + +`git p4 clone {{path/to/p4_depot}}` + +- Sync changes from Perforce into the current Git repository: + +`git p4 sync {{path/to/p4_depot}}` + +- Rebase local commits on top of the latest Perforce changes: + +`git p4 rebase` + +- Submit Git changes back to Perforce: + +`git p4 submit` + +- Clone the full Perforce history instead of only the latest changelist: + +`git p4 clone {{path/to/p4_depot}}@all` diff --git a/tldr/grpcurl b/tldr/grpcurl index 37baff25..a28f30de 100644 --- a/tldr/grpcurl +++ b/tldr/grpcurl @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Send a request with a header and a body: -`grpcurl -H "{{Authorization: Bearer $token}}" -d {{'{"foo": "bar"}'}} {{grpc.server.com:443}} {{my.custom.server.Service/Method}}` +`grpcurl -H "{{Authorization: Bearer $token}}" -d '{{{"foo": "bar"}}}' {{grpc.server.com:443}} {{my.custom.server.Service/Method}}` - List all services exposed by a server: diff --git a/tldr/join b/tldr/join index ed55c796..d53ed803 100644 --- a/tldr/join +++ b/tldr/join @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Join two files using a comma (instead of a space) as the field separator: -`join -t {{','}} {{path/to/file1}} {{path/to/file2}}` +`join -t '{{,}}' {{path/to/file1}} {{path/to/file2}}` - Join field3 of file1 with field1 of file2: diff --git a/tldr/linux/blastn b/tldr/linux/blastn index e2d0154b..28c23b55 100644 --- a/tldr/linux/blastn +++ b/tldr/linux/blastn @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Align two or more sequences, custom tabular output format, output to file: -`blastn -query {{query.fa}} -subject {{subject.fa}} -outfmt {{'6 qseqid qlen qstart qend sseqid slen sstart send bitscore evalue pident'}} -out {{output.tsv}}` +`blastn -query {{query.fa}} -subject {{subject.fa}} -outfmt '{{6 qseqid qlen qstart qend sseqid slen sstart send bitscore evalue pident}}' -out {{output.tsv}}` - Search nucleotide databases using a nucleotide query, 16 threads (CPUs) to use in the BLAST search, with a maximum number of 10 aligned sequences to keep: diff --git a/tldr/linux/esearch b/tldr/linux/esearch index 5c3d3ce0..908274a0 100644 --- a/tldr/linux/esearch +++ b/tldr/linux/esearch @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Search the protein database using a query and `regex`: -`esearch -db {{protein}} -query {{'Escherichia*'}}` +`esearch -db {{protein}} -query '{{Escherichia*}}'` - Search the nucleotide database for sequences whose metadata contain insulin and rodents: diff --git a/tldr/linux/extundelete b/tldr/linux/extundelete index bb732e39..cbc2f485 100644 --- a/tldr/linux/extundelete +++ b/tldr/linux/extundelete @@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git > See also: `date` for Unix time information and `umount` for unmounting partitions. > More information: . -- Restore all deleted files inside partition N on device X: +- Restore all deleted files inside partition `N` on device `X`: `sudo extundelete {{/dev/sdXN}} --restore-all` diff --git a/tldr/linux/handlr b/tldr/linux/handlr index c44a47c8..34f83bd0 100644 --- a/tldr/linux/handlr +++ b/tldr/linux/handlr @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Set MPV as the default application for all audio files: -`handlr set {{'audio/*'}} {{mpv.desktop}}` +`handlr set '{{audio/*}}' {{mpv.desktop}}` - List all default apps: diff --git a/tldr/linux/head b/tldr/linux/head index 49644b48..690b05e3 100644 --- a/tldr/linux/head +++ b/tldr/linux/head @@ -8,6 +8,18 @@ source: https://github.com/tldr-pages/tldr.git > Output the first part of files. > More information: . +- Show first 10 lines in a file: + +`head {{path/to/file}}` + +- Show first 10 lines of multiple files: + +`head {{path/to/file1 path/to/file2 ...}}` + +- Output the first 5 lines of a file: + +`head {{[-5|--lines 5]}} {{path/to/file}}` + - Output the first few lines of a file: `head {{[-n|--lines]}} {{count}} {{path/to/file}}` diff --git a/tldr/linux/rename.util b/tldr/linux/rename.util index d814d73b..3e980ea5 100644 --- a/tldr/linux/rename.util +++ b/tldr/linux/rename.util @@ -28,7 +28,7 @@ source: https://github.com/tldr-pages/tldr.git - Prepend "foo" to all filenames in the current directory: -`rename {{''}} {{'foo'}} {{*}}` +`rename '' '{{foo}}' {{*}}` - Rename a group of increasingly numbered files zero-padding the numbers up to 3 digits: diff --git a/tldr/linux/semanage-fcontext b/tldr/linux/semanage-fcontext index b8102fe4..5cb7c103 100644 --- a/tldr/linux/semanage-fcontext +++ b/tldr/linux/semanage-fcontext @@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git - Add a user-defined rule that labels any path which matches a PCRE `regex`: -`sudo semanage fcontext {{[-a|--add]}} {{[-t|--type]}} {{samba_share_t}} {{'/mnt/share(/.*)?'}}` +`sudo semanage fcontext {{[-a|--add]}} {{[-t|--type]}} {{samba_share_t}} '{{/mnt/share(/.*)?}}'` - Delete a user-defined rule using its PCRE `regex`: -`sudo semanage fcontext {{[-d|--delete]}} {{'/mnt/share(/.*)?'}}` +`sudo semanage fcontext {{[-d|--delete]}} '{{/mnt/share(/.*)?}}'` - Relabel a directory recursively by applying the new rules: diff --git a/tldr/linux/setxkbmap b/tldr/linux/setxkbmap index 4e247ec7..41ab8253 100644 --- a/tldr/linux/setxkbmap +++ b/tldr/linux/setxkbmap @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Set multiple keyboard layouts, their variants and switching option: -`setxkbmap -layout {{us,de}} -variant {{,qwerty}} -option {{'grp:alt_caps_toggle'}}` +`setxkbmap -layout {{us,de}} -variant {{,qwerty}} -option '{{grp:alt_caps_toggle}}'` - List all layouts: diff --git a/tldr/linux/systemctl-revert b/tldr/linux/systemctl-revert new file mode 100644 index 00000000..57ee953a --- /dev/null +++ b/tldr/linux/systemctl-revert @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# systemctl revert + +> Revert unit files to their vendor versions. +> Undoes the effects of `edit`, `enable`, `disable`, `set-property`, and `mask`. +> More information: . + +- Revert unit files to their default settings: + +`systemctl revert {{unit1 unit2 ...}}` + +- Revert a user unit file: + +`systemctl revert {{unit}} --user` diff --git a/tldr/linux/wev b/tldr/linux/wev new file mode 100644 index 00000000..7d9b6ade --- /dev/null +++ b/tldr/linux/wev @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# wev + +> Print contents of Wayland events. +> More information: . + +- Monitor all occurring Wayland events: + +`wev` + +- Print all events received by a specific Wayland interface: + +`wev -f {{wl_keyboard}}` + +- Print only specific events received by a Wayland interface: + +`wev -f {{wl_keyboard}}:{{key}}` + +- Print everything but the specified wayland events: + +`wev -F {{wl_keyboard}}:{{key}}` + +- Write the `wl_keyboards`'s keymap to a file: + +`wev -M {{path/to/file}}` + +- Print Wayland globals: + +`wev -g` diff --git a/tldr/linux/xterm b/tldr/linux/xterm index 706b7073..873cbcfc 100644 --- a/tldr/linux/xterm +++ b/tldr/linux/xterm @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Open the terminal using a Serif font and a font size equal to 20: -`xterm -fa {{'Serif'}} -fs {{20}}` +`xterm -fa '{{Serif}}' -fs {{20}}` diff --git a/tldr/magick b/tldr/magick index 6e94c236..febcfb55 100644 --- a/tldr/magick +++ b/tldr/magick @@ -22,6 +22,10 @@ source: https://github.com/tldr-pages/tldr.git `magick {{path/to/input_image.png}} -resize {{50}}% {{path/to/output_image.png}}` +- Scale an image to have a specified file size: + +`magick {{path/to/input_image.png}} -define jpeg:extent={{512kb}} {{path/to/output_image.jpg}}` + - Create a GIF out of all JPEG images in the current directory: `magick {{*.jpg}} {{path/to/images.gif}}` diff --git a/tldr/magick-convert b/tldr/magick-convert index 1b7748d3..95b73b02 100644 --- a/tldr/magick-convert +++ b/tldr/magick-convert @@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Scale an image to have a specified file size: -`magick convert {{path/to/input_image.png}} -define jpeg:extent=512kb {{path/to/output_image.jpg}}` +`magick convert {{path/to/input_image.png}} -define jpeg:extent={{512kb}} {{path/to/output_image.jpg}}` - Vertically/horizontally append images and have the empty space be transparent: diff --git a/tldr/minio-server b/tldr/minio-server new file mode 100644 index 00000000..d1ff2017 --- /dev/null +++ b/tldr/minio-server @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# minio server + +> MinIO server command for starting the MinIO S3 compatible storage engine. +> More information: . + +- Start a server using the default configuration: + +`minio server {{path/to/data_directory}}` + +- Start a server binding to a different port for the API and web console: + +`minio server --address ":{{port}}" --console-address ":{{port}}" {{path/to/data_directory}}` + +- Start a server as part of a cluster of 2 nodes: + +`minio server {{node1_hostname}} {{path/to/data_directory}} {{node2_hostname}} {{path/to/data_directory}}` diff --git a/tldr/msgattrib b/tldr/msgattrib new file mode 100644 index 00000000..89716ef5 --- /dev/null +++ b/tldr/msgattrib @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# msgattrib + +> Filter and manipulate message attributes in `.po` translation files. +> More information: . + +- Keep only translated messages: + +`msgattrib --translated {{input.po}} > {{translated.po}}` + +- Keep only untranslated messages: + +`msgattrib --untranslated {{input.po}} > {{untranslated.po}}` + +- Remove fuzzy messages: + +`msgattrib --no-fuzzy {{input.po}} > {{clean.po}}` + +- Keep only fuzzy messages: + +`msgattrib --only-fuzzy {{input.po}} > {{fuzzy.po}}` + +- Mark all messages as fuzzy: + +`msgattrib --set-fuzzy {{input.po}} > {{fuzzy.po}}` + +- Clear fuzzy marks: + +`msgattrib --clear-fuzzy {{input.po}} > {{clean.po}}` + +- Sort output by file location: + +`msgattrib {{[-F|--sort-by-file]}} {{input.po}} > {{sorted.po}}` + +- Display help: + +`msgattrib {{[-h|--help]}}` diff --git a/tldr/osx/afplay b/tldr/osx/afplay index eee75602..0dc38ac7 100644 --- a/tldr/osx/afplay +++ b/tldr/osx/afplay @@ -20,6 +20,6 @@ source: https://github.com/tldr-pages/tldr.git `afplay --rate {{0.5}} {{path/to/file}}` -- Play the first N seconds of a sound file: +- Play the first `n` seconds of a sound file: -`afplay --time {{seconds}} {{path/to/file}}` +`afplay --time {{n}} {{path/to/file}}` diff --git a/tldr/osx/du b/tldr/osx/du index bc0197b0..81df1666 100644 --- a/tldr/osx/du +++ b/tldr/osx/du @@ -24,10 +24,10 @@ source: https://github.com/tldr-pages/tldr.git `du -ah {{path/to/directory}}` -- List the human-readable sizes of a directory and any subdirectories, up to N levels deep: +- List the human-readable sizes of a directory and any subdirectories, up to `n` levels deep: -`du -h -d {{2}} {{path/to/directory}}` +`du -h -d {{n}} {{path/to/directory}}` - List the human-readable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end: -`du -ch {{*/*.jpg}}` +`du -ch */*.jpg` diff --git a/tldr/osx/tail b/tldr/osx/tail index d53d0396..2e0eddb9 100644 --- a/tldr/osx/tail +++ b/tldr/osx/tail @@ -29,6 +29,6 @@ source: https://github.com/tldr-pages/tldr.git `tail -F {{path/to/file}}` -- Show last 'count' lines in 'file' and refresh every 'seconds' seconds: +- Show last `count` lines in a file and refresh every `seconds` seconds: -`tail -n {{8}} -s {{10}} -f {{path/to/file}}` +`tail -n {{count}} -s {{seconds}} -f {{path/to/file}}` diff --git a/tldr/pageres b/tldr/pageres index 26e2ce8c..02433952 100644 --- a/tldr/pageres +++ b/tldr/pageres @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Provide a custom filename template: -`pageres {{https://example.com/}} {{1024x768}} --filename={{'<%= date %> - <%= url %>'}}` +`pageres {{https://example.com/}} {{1024x768}} --filename='{{<%= date %> - <%= url %>}}'` - Capture a specific element on a page: diff --git a/tldr/pastel b/tldr/pastel index eb9d7784..a0754854 100644 --- a/tldr/pastel +++ b/tldr/pastel @@ -20,9 +20,9 @@ source: https://github.com/tldr-pages/tldr.git `pastel pick` -- Generate a set of N visually distinct colors: +- Generate a set of `n` visually distinct colors: -`pastel distinct {{8}}` +`pastel distinct {{n}}` - List all X11/CSS color names: diff --git a/tldr/pdfgrep b/tldr/pdfgrep index 34cd55c5..f87e6be6 100644 --- a/tldr/pdfgrep +++ b/tldr/pdfgrep @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Do a case-insensitive search for lines that begin with "foo" and return the first 3 matches: -`pdfgrep {{[-m|--max-count]}} {{3}} {{[-i|--ignore-case]}} {{'^foo'}} {{file.pdf}}` +`pdfgrep {{[-m|--max-count]}} {{3}} {{[-i|--ignore-case]}} '{{^foo}}' {{file.pdf}}` - Find pattern in files with a `.pdf` extension in the current directory recursively: @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Find pattern on files that match a specific glob in the current directory recursively: -`pdfgrep {{[-r|--recursive]}} --include {{'*book.pdf'}} {{pattern}}` +`pdfgrep {{[-r|--recursive]}} --include '{{*book.pdf}}' {{pattern}}` diff --git a/tldr/piper b/tldr/piper index 21cb5842..a9a3500a 100644 --- a/tldr/piper +++ b/tldr/piper @@ -15,16 +15,16 @@ source: https://github.com/tldr-pages/tldr.git - Output a WAV [f]ile using a [m]odel and specifying its JSON [c]onfig file: -`echo {{'Thing to say'}} | piper -m {{path/to/model.onnx}} -c {{path/to/model.onnx.json}} -f {{outputfile.wav}}` +`echo {{Thing to say}} | piper -m {{path/to/model.onnx}} -c {{path/to/model.onnx.json}} -f {{outputfile.wav}}` - Select a particular speaker in a voice with multiple speakers by specifying the speaker's ID number: -`echo {{'Warum?'}} | piper -m {{de_DE-thorsten_emotional-medium.onnx}} --speaker {{1}} -f {{angry.wav}}` +`echo {{Warum?}} | piper -m {{de_DE-thorsten_emotional-medium.onnx}} --speaker {{1}} -f {{angry.wav}}` - Stream the output to the mpv media player: -`echo {{'Hello world'}} | piper -m {{en_GB-northern_english_male-medium.onnx}} --output-raw -f - | mpv -` +`echo {{Hello world}} | piper -m {{en_GB-northern_english_male-medium.onnx}} --output-raw -f - | mpv -` - Speak twice as fast, with huge gaps between sentences: -`echo {{'Speaking twice the speed. With added drama!'}} | piper -m {{foo.onnx}} --length_scale {{0.5}} --sentence_silence {{2}} -f {{drama.wav}}` +`echo {{Speaking twice the speed. With added drama!}} | piper -m {{foo.onnx}} --length_scale {{0.5}} --sentence_silence {{2}} -f {{drama.wav}}` diff --git a/tldr/poetry-source b/tldr/poetry-source new file mode 100644 index 00000000..6d218892 --- /dev/null +++ b/tldr/poetry-source @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# poetry source + +> Add source configurations to your Poetry project. +> See also: `asdf`. +> More information: . + +- Add a source configuration: + +`poetry source add {{source_name}} {{source_url}}` + +- Set the priority of a source: + +`poetry source add --priority {{primary|supplemental|explicit}} {{source_name}} {{source_url}}` + +- Display info for all sources: + +`poetry source show` + +- Display info for a specific source: + +`poetry source show {{source_name}}` + +- Remove a source from your `pyproject.toml` file: + +`poetry source remove {{source_name}}` diff --git a/tldr/pueue b/tldr/pueue index 03719a08..bb283795 100644 --- a/tldr/pueue +++ b/tldr/pueue @@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git - Send data to a task's `stdin`: -`pueue send {{task_id}} {{"hello"}}` +`pueue send {{task_id}} "{{hello}}"` - View a task's `stdout` and `stderr`, as well as basic information about that task: diff --git a/tldr/pulumi-org b/tldr/pulumi-org index 90541010..a0472485 100644 --- a/tldr/pulumi-org +++ b/tldr/pulumi-org @@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git - Search for resources in Pulumi Cloud using Pulumi AI with a plaintext natural language query: -`pulumi org search ai {{[-q|--query]}} {{"show me all load balancers in my organization"}}` +`pulumi org search ai {{[-q|--query]}} "{{show me all load balancers in my organization}}"` - Display help: diff --git a/tldr/rsql b/tldr/rsql index 143bed0f..815ca209 100644 --- a/tldr/rsql +++ b/tldr/rsql @@ -14,24 +14,24 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a database (e.g. PostgreSQL): -`rsql --url {{"postgresql://user:pass@localhost/mydb"}}` +`rsql --url "{{postgresql://user:pass@localhost/mydb}}"` - Connect to a PostgreSQL database with SSL: -`rsql --url {{"postgresql://user:pass@localhost/db?sslmode=require"}}` +`rsql --url "{{postgresql://user:pass@localhost/db?sslmode=require}}"` - Connect to a MySQL database with a specified charset: -`rsql --url {{"mysql://user:pass@localhost/db?charset=utf8mb4"}}` +`rsql --url "{{mysql://user:pass@localhost/db?charset=utf8mb4}}"` - Run a query and exit: -`rsql --url {{"sqlite://database.db"}} -- "SELECT * FROM users LIMIT 10"` +`rsql --url "{{sqlite://database.db}}" -- "{{SELECT * FROM users LIMIT 10}}"` - Set default format: -`rsql --url {{"sqlite://db.sqlite"}} --format json` +`rsql --url "{{sqlite://db.sqlite}}" --format json` - Connect to file and use custom line separator: -`rsql --url {{"delimited://data.txt?separator=|&has_header=true"}}` +`rsql --url "{{delimited://data.txt?separator=|&has_header=true}}"` diff --git a/tldr/sd b/tldr/sd index 48e75314..bb808257 100644 --- a/tldr/sd +++ b/tldr/sd @@ -18,8 +18,8 @@ source: https://github.com/tldr-pages/tldr.git - Find and replace in a specific file (output stream: `stdout`): -`sd {{[-p|--preview]}} {{'window.fetch'}} {{'fetch'}} {{path/to/file.js}}` +`sd {{[-p|--preview]}} '{{window.fetch}}' '{{fetch}}' {{path/to/file.js}}` - Find and replace in all files in the current project (output stream: `stdout`): -`sd {{'from "react"'}} {{'from "preact"'}} "$(find . -type f)"` +`sd '{{from "react"}}' '{{from "preact"}}' "$(find . -type f)"` diff --git a/tldr/smbmap b/tldr/smbmap index 7f5d36b8..7b1a1010 100644 --- a/tldr/smbmap +++ b/tldr/smbmap @@ -28,9 +28,9 @@ source: https://github.com/tldr-pages/tldr.git `smbmap {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -d {{domain}} -H {{ip_or_hostname}}` -- Locate and download files [R]ecursively up to N levels depth, searching for filename pattern (`regex`), and excluding certain shares: +- Locate and download files [R]ecursively up to `n` levels depth, searching for filename pattern (`regex`), and excluding certain shares: -`smbmap --host-file {{path/to/file}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -q -R --depth {{number}} --exclude {{sharename}} -A {{filepattern}}` +`smbmap --host-file {{path/to/file}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -q -R --depth {{n}} --exclude {{sharename}} -A {{filepattern}}` - Upload file through smb using username and password: diff --git a/tldr/tail b/tldr/tail index fbbe3e8b..58656cbb 100644 --- a/tldr/tail +++ b/tldr/tail @@ -9,6 +9,14 @@ source: https://github.com/tldr-pages/tldr.git > See also: `head`. > More information: . +- Show last 10 lines in a file: + +`tail {{path/to/file}}` + +- Show last 10 lines of multiple files: + +`tail {{path/to/file1 path/to/file2 ...}}` + - Show last 'count' lines in file: `tail {{[-n|--lines]}} {{count}} {{path/to/file}}` @@ -29,6 +37,6 @@ source: https://github.com/tldr-pages/tldr.git `tail {{[-F|--retry --follow]}} {{path/to/file}}` -- Show last 'count' lines in 'file' and refresh every 'seconds' seconds: +- Show last `count` lines in a file and refresh every `seconds` seconds: `tail {{[-n|--lines]}} {{count}} {{[-s|--sleep-interval]}} {{seconds}} {{[-f|--follow]}} {{path/to/file}}` diff --git a/tldr/vboxmanage-import b/tldr/vboxmanage-import index 21bad0f3..311f4aaf 100644 --- a/tldr/vboxmanage-import +++ b/tldr/vboxmanage-import @@ -30,12 +30,12 @@ source: https://github.com/tldr-pages/tldr.git - Set the guest OS type (one of `VBoxManage list ostypes`) for the imported VM: -`VBoxManage import {{path/to/file.ovf}} --ostype={{ostype}}` +`VBoxManage import {{path/to/file.ovf}} --ostype {{ostype}}` - Set the memory (in megabytes) for the imported VM: -`VBoxManage import {{path/to/file.ovf}} --memory={{1}}` +`VBoxManage import {{path/to/file.ovf}} --memory {{1}}` - Set the number of CPUs for the imported VM: -`VBoxManage import {{path/to/file.ovf}} --cpus={{1}}` +`VBoxManage import {{path/to/file.ovf}} --cpus {{1}}` diff --git a/tldr/vboxmanage-startvm b/tldr/vboxmanage-startvm index 90cc1f31..4bdccee4 100644 --- a/tldr/vboxmanage-startvm +++ b/tldr/vboxmanage-startvm @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Start a virtual machine with an environment variable pair name value: -`VBoxManage startvm {{vm_name|uuid}} --put-env={{name}}={{value}}` +`VBoxManage startvm {{vm_name|uuid}} {{[-E|--putenv]}} {{name}}={{value}}` diff --git a/tldr/windows/compress-archive b/tldr/windows/compress-archive new file mode 100644 index 00000000..494eaa7d --- /dev/null +++ b/tldr/windows/compress-archive @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# Compress-Archive + +> A cmdlet in PowerShell is used to create compressed (zipped) archive files. +> More information: . + +- Compress a single file: + +`Compress-Archive -Path {{path o ile.txt}} -DestinationPath {{path o ile.zip}}` + +- Compress multiple files: + +`Compress-Archive -Path {{path o ile1, path o ile2, ...}} -DestinationPath {{path o iles.zip}}` + +- Compress a directory: + +`Compress-Archive -Path {{path o\directory}} -DestinationPath {{path o\directory.zip}}` + +- Update an existing archive: + +`Compress-Archive -Path {{path o ile}} -DestinationPath {{path o\directory.zip}} -Update` + +- Set compression level: + +`Compress-Archive -Path {{path o\directory}} -DestinationPath {{path o\directory.zip}} -CompressionLevel {{Optimal|Fastest|NoCompression}}` diff --git a/tldr/windows/expand-archive b/tldr/windows/expand-archive new file mode 100644 index 00000000..39e46bd6 --- /dev/null +++ b/tldr/windows/expand-archive @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, windows] +source: https://github.com/tldr-pages/tldr.git +--- +# Expand-Archive + +> A cmdlet in PowerShell is used to extract files from a compressed archive. +> More information: . + +- Extract a ZIP file to a folder: + +`Expand-Archive -Path {{path oxample.zip}} -DestinationPath {{path oxtracted_files}}` + +- Overwrite existing files: + +`Expand-Archive -Path {{path oxample.zip}} -DestinationPath {{path oxtracted_files}} -Force` + +- Preview without extracting: + +`Expand-Archive -Path {{path oxample.zip}} -DestinationPath {{path oxtracted_files}} -WhatIf` diff --git a/tldr/windows/get-history b/tldr/windows/get-history index 4974644c..5671aaef 100644 --- a/tldr/windows/get-history +++ b/tldr/windows/get-history @@ -17,6 +17,6 @@ source: https://github.com/tldr-pages/tldr.git `Get-History -Id {{id}}` -- Display the last N commands: +- Display the last `n` commands: -`Get-History -Count {{10}}` +`Get-History -Count {{n}}` diff --git a/tldr/windows/invoke-webrequest b/tldr/windows/invoke-webrequest index 3731af66..4ece6481 100644 --- a/tldr/windows/invoke-webrequest +++ b/tldr/windows/invoke-webrequest @@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Send data in JSON format, specifying the appropriate content-type header: -`Invoke-WebRequest -Body {{'{"name":"bob"}'}} -ContentType 'application/json' {{http://example.com/users/1234}}` +`Invoke-WebRequest -Body '{{{"name":"bob"}}}' -ContentType 'application/json' {{http://example.com/users/1234}}` - Pass a username and password for server authentication: diff --git a/tldr/windows/sc b/tldr/windows/sc index c60a878b..5e495079 100644 --- a/tldr/windows/sc +++ b/tldr/windows/sc @@ -10,16 +10,24 @@ source: https://github.com/tldr-pages/tldr.git - Show the status of a service (no service name will list all services): -`sc.exe query {{service_name}}` +`sc query {{service_name}}` - Start a service asynchronously: -`sc.exe create {{service_name}} binpath= {{path o\service_binary_file}}` +`sc start {{service_name}}` - Stop a service asynchronously: -`sc.exe delete {{service_name}}` +`sc stop {{service_name}}` + +- Create a service: + +`sc create {{service_name}} binpath= {{path o\service_binary_file}}` + +- Delete a service: + +`sc delete {{service_name}}` - Set the type of a service: -`sc.exe config {{service_name}} type= {{service_type}}` +`sc config {{service_name}} type= {{service_type}}` diff --git a/tldr/x8 b/tldr/x8 index f837ad14..29e8cda7 100644 --- a/tldr/x8 +++ b/tldr/x8 @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Send parameters via POST body with JSON format: -`x8 {{[-u|--url]}} {{https://example.com/}} {{[-X|--method]}} {{POST}} {{[-b|--body]}} {{'{"x":{%s\}\}'}} {{[-w|--wordlist]}} {{path/to/wordlist.txt}}` +`x8 {{[-u|--url]}} {{https://example.com/}} {{[-X|--method]}} {{POST}} {{[-b|--body]}} '{{{"x":{%s\}\}}}' {{[-w|--wordlist]}} {{path/to/wordlist.txt}}` - Check parameters with a custom template (`%k` for key, `%v` for value): diff --git a/tldr/x_x b/tldr/x_x index 0e20d182..7c0dc3cf 100644 --- a/tldr/x_x +++ b/tldr/x_x @@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git - View a CSV file with unconventional delimiters: -`x_x {{[-d|--delimiter]}} {{';'}} {{[-q|--quotechar]}} {{'|'}} {{file.csv}}` +`x_x {{[-d|--delimiter]}} '{{;}}' {{[-q|--quotechar]}} '{{|}}' {{file.csv}}` diff --git a/tldr/xe b/tldr/xe index a843d647..15dd2e7f 100644 --- a/tldr/xe +++ b/tldr/xe @@ -23,7 +23,7 @@ b' | xe -N{{2}} -s 'echo $2 $1'` - Delete all files with a `.backup` extension: -`find . -name {{'*.backup'}} | xe rm -v` +`find . -name '{{*.backup}}' | xe rm -v` - Run up to `max-jobs` processes in parallel; the default is 1. If `max-jobs` is 0, xe will run as many processes as cpu cores: diff --git a/tldr/xidel b/tldr/xidel index 45342a08..4400d288 100644 --- a/tldr/xidel +++ b/tldr/xidel @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Print the title of all pages found by a Google search and download them: -`xidel {{https://www.google.com/search?q=test}} {{[-f|--follow]}} "{{//a/extract(@href, 'url[?]q=([^&]+)&', 1)[. != '']}}" {{[-e|--extract]}} {{//title}} --download {{'{$host}/'}}` +`xidel {{https://www.google.com/search?q=test}} {{[-f|--follow]}} "{{//a/extract(@href, 'url[?]q=([^&]+)&', 1)[. != '']}}" {{[-e|--extract]}} {{//title}} --download '{{{$host}/}}'` - Follow all links on a page and print the titles, with XPath: