From ffbd8c31dbe55889c47b874ff8f97a621b8f4e3d Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Wed, 12 Mar 2025 00:18:03 +0000 Subject: [PATCH] Update cheatsheets --- tldr/curl | 26 +++++++++++++------------- tldr/file | 8 ++++---- tldr/gdb | 8 ++++---- tldr/gettext | 13 +++++++++++++ tldr/git-restore | 2 +- tldr/linux/cal | 10 +++++----- tldr/linux/cat | 4 ++-- tldr/linux/cu | 8 ++++---- tldr/linux/man | 12 ++++++------ tldr/linux/minicom | 10 +++++++--- tldr/linux/pw-reserve | 17 +++++++++++++++++ tldr/linux/pw-v4l2 | 13 +++++++++++++ tldr/linux/trash-empty | 12 ++++++++++++ tldr/linux/trash-list | 12 ++++++++++++ tldr/linux/trash-put | 12 ++++++++++++ tldr/linux/trash-restore | 12 ++++++++++++ tldr/linux/trash-rm | 12 ++++++++++++ tldr/linux/upower | 8 ++++---- tldr/mount | 12 ++++++------ tldr/msgfmt | 6 +++++- tldr/msginit | 17 +++++++++++++++++ tldr/msgmerge | 13 +++++++++++++ tldr/o | 25 +++++++++++++++++++++++++ tldr/picocom | 12 ++++++++++-- tldr/ps | 8 ++++---- tldr/rsync | 2 +- tldr/seq | 4 ++-- tldr/sudo | 12 ++++++------ tldr/xgettext | 4 ++-- 29 files changed, 244 insertions(+), 70 deletions(-) create mode 100644 tldr/gettext create mode 100644 tldr/linux/pw-reserve create mode 100644 tldr/linux/pw-v4l2 create mode 100644 tldr/linux/trash-empty create mode 100644 tldr/linux/trash-list create mode 100644 tldr/linux/trash-put create mode 100644 tldr/linux/trash-restore create mode 100644 tldr/linux/trash-rm create mode 100644 tldr/msginit create mode 100644 tldr/msgmerge create mode 100644 tldr/o diff --git a/tldr/curl b/tldr/curl index 00e665e8..84a8afa9 100644 --- a/tldr/curl +++ b/tldr/curl @@ -13,30 +13,30 @@ source: https://github.com/tldr-pages/tldr.git `curl {{https://example.com}}` -- Make an HTTP GET request, fo[L]low any `3xx` redirects, and [D]ump the reply headers and contents to `stdout`: +- Make an HTTP GET request, follow any `3xx` redirects, and dump the reply headers and contents to `stdout`: -`curl --location --dump-header - {{https://example.com}}` +`curl {{[-L|--location]}} {{[-D|--dump-header]}} - {{https://example.com}}` -- Download a file, saving the [O]utput under the filename indicated by the URL: +- Download a file, saving the output under the filename indicated by the URL: -`curl --remote-name {{https://example.com/filename.zip}}` +`curl {{[-O|--remote-name]}} {{https://example.com/filename.zip}}` -- Send form-encoded [d]ata (POST request of type `application/x-www-form-urlencoded`). Use `--data @file_name` or `--data @'-'` to read from `stdin`: +- 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 POST --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 pro[x]y (such as BurpSuite), ignoring insecure self-signed certificates: +- 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 --proxy {{http://127.0.0.1:8080}} --header {{'Authorization: Bearer token'}} --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 [H]eader: +- Send data in JSON format, specifying the appropriate Content-Type header: -`curl --data {{'{"name":"bob"}'}} --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 key for a resource, skipping certificate validation: -`curl --cert {{client.pem}} --key {{key.pem}} --insecure {{https://example.com}}` +`curl {{[-E|--cert]}} {{client.pem}} --key {{key.pem}} {{[-k|--insecure]}} {{https://example.com}}` -- Resolve a hostname to a custom IP address, with [v]erbose output (similar to editing the `/etc/hosts` file for custom DNS resolution): +- Resolve a hostname to a custom IP address, with verbose output (similar to editing the `/etc/hosts` file for custom DNS resolution): -`curl --verbose --resolve {{example.com}}:{{80}}:{{127.0.0.1}} {{http://example.com}}` +`curl {{[-v|--verbose]}} --resolve {{example.com}}:{{80}}:{{127.0.0.1}} {{http://example.com}}` diff --git a/tldr/file b/tldr/file index 8666b600..882fdca5 100644 --- a/tldr/file +++ b/tldr/file @@ -14,16 +14,16 @@ source: https://github.com/tldr-pages/tldr.git - Look inside a zipped file and determine the file type(s) inside: -`file -z {{foo.zip}}` +`file {{[-z|--uncompress]}} {{foo.zip}}` - Allow file to work with special or device files: -`file -s {{path/to/file}}` +`file {{[-s|--special-files]}} {{path/to/file}}` - Don't stop at first file type match; keep going until the end of the file: -`file -k {{path/to/file}}` +`file {{[-k|--keep-going]}} {{path/to/file}}` - Determine the MIME encoding type of a file: -`file -i {{path/to/file}}` +`file {{[-i|--mime]}} {{path/to/file}}` diff --git a/tldr/gdb b/tldr/gdb index 808a518f..9b74f9e6 100644 --- a/tldr/gdb +++ b/tldr/gdb @@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git - Attach a process to gdb: -`gdb -p {{procID}}` +`gdb {{[-p|--pid]}} {{procID}}` - Debug with a core file: -`gdb -c {{core}} {{executable}}` +`gdb {{[-c|--core]}} {{core}} {{executable}}` - Execute given GDB commands upon start: -`gdb -ex "{{commands}}" {{executable}}` +`gdb {{[-ex|--eval-command]}} "{{commands}}" {{executable}}` - Start `gdb` and pass arguments to the executable: @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Skip debuginfod and pagination prompts and then print the backtrace: -`gdb -c {{core}} {{executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt` +`gdb {{[-c|--core]}} {{core}} {{executable}} -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex bt` diff --git a/tldr/gettext b/tldr/gettext new file mode 100644 index 00000000..742b3f50 --- /dev/null +++ b/tldr/gettext @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# gettext + +> Get string translations. +> More information: . + +- Get the translation of a string or output a default string if it doesn't exist: + +`LANGUAGE={{locale}} gettext {{msgid}} {{default_value}}` diff --git a/tldr/git-restore b/tldr/git-restore index 75c5683f..8114aaf6 100644 --- a/tldr/git-restore +++ b/tldr/git-restore @@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git > See also `git checkout` and `git reset`. > More information: . -- Restore an unstaged file to the version of the current commit (HEAD): +- Restore an unstaged file to the staged version: `git restore {{path/to/file}}` diff --git a/tldr/linux/cal b/tldr/linux/cal index 0085fffd..14358a36 100644 --- a/tldr/linux/cal +++ b/tldr/linux/cal @@ -12,21 +12,21 @@ source: https://github.com/tldr-pages/tldr.git `cal` -- Display [3] months spanning the date: +- Display 3 months spanning the date: -`cal -3` +`cal {{[-3|--three]}}` - Display the whole calendar for the current [y]ear: -`cal --year` +`cal {{[-y|--year]}}` - Display the next twelve months: -`cal --twelve` +`cal {{[-Y|--twelve]}}` - Use Monday as the first day of the week: -`cal --monday` +`cal {{[-m|--monday]}}` - Display a calendar for a specific year (4 digits): diff --git a/tldr/linux/cat b/tldr/linux/cat index f3d3c7dd..74f88a71 100644 --- a/tldr/linux/cat +++ b/tldr/linux/cat @@ -26,8 +26,8 @@ source: https://github.com/tldr-pages/tldr.git - [n]umber all output lines: -`cat -n {{path/to/file}}` +`cat {{[-n|--number]}} {{path/to/file}}` - Display non-printable and whitespace characters (with `M-` prefix if non-ASCII): -`cat -v -t -e {{path/to/file}}` +`cat {{[-vte|--show-nonprinting -t -e]}} {{path/to/file}}` diff --git a/tldr/linux/cu b/tldr/linux/cu index fa9171b6..5fefcb52 100644 --- a/tldr/linux/cu +++ b/tldr/linux/cu @@ -10,19 +10,19 @@ source: https://github.com/tldr-pages/tldr.git - Open a given serial port: -`sudo cu --line {{/dev/ttyUSB0}}` +`sudo cu --line {{/dev/ttyXYZ}}` - Open a given serial port with a given baud rate: -`sudo cu --line {{/dev/ttyUSB0}} --speed {{115200}}` +`sudo cu --line {{/dev/ttyXYZ}} --speed {{115200}}` - Open a given serial port with a given baud rate and echo characters locally (half-duplex mode): -`sudo cu --line {{/dev/ttyUSB0}} --speed {{115200}} --halfduplex` +`sudo cu --line {{/dev/ttyXYZ}} --speed {{115200}} --halfduplex` - Open a given serial port with a given baud rate, parity, and no hardware or software flow control: -`sudo cu --line {{/dev/ttyUSB0}} --speed {{115200}} --parity={{even|odd|none}} --nortscts --nostop` +`sudo cu --line {{/dev/ttyXYZ}} --speed {{115200}} --parity={{even|odd|none}} --nortscts --nostop` - Exit the `cu` session when in connection: diff --git a/tldr/linux/man b/tldr/linux/man index eebc09ba..a994f3c3 100644 --- a/tldr/linux/man +++ b/tldr/linux/man @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Open the man page for a command in a browser (`BROWSER` environment variable can replace `=browser_name`): -`man --html{{=browser_name}} {{command}}` +`man {{[-H|--html=]}}{{browser_name}} {{command}}` - Display the man page for a command from section 7: @@ -22,20 +22,20 @@ source: https://github.com/tldr-pages/tldr.git - List all available sections for a command: -`man --whatis {{command}}` +`man {{[-f|--whatis]}} {{command}}` - Display the path searched for manpages: -`man --path` +`man {{[-w|--path]}}` - Display the location of a manpage rather than the manpage itself: -`man --where {{command}}` +`man {{[-w|--where]}} {{command}}` - Display the man page using a specific locale: -`man --locale {{locale}} {{command}}` +`man {{[-L|--locale]}} {{locale}} {{command}}` - Search for manpages containing a search string: -`man --apropos "{{search_string}}"` +`man {{[-k|--apropos]}} "{{search_string}}"` diff --git a/tldr/linux/minicom b/tldr/linux/minicom index 8d285d7b..c9ed5e16 100644 --- a/tldr/linux/minicom +++ b/tldr/linux/minicom @@ -10,12 +10,16 @@ source: https://github.com/tldr-pages/tldr.git - Open a given serial port: -`sudo minicom --device {{/dev/ttyUSB0}}` +`sudo minicom --device {{/dev/ttyXYZ}}` - Open a given serial port with a given baud rate: -`sudo minicom --device {{/dev/ttyUSB0}} --baudrate {{115200}}` +`sudo minicom --device {{/dev/ttyXYZ}} --baudrate {{115200}}` - Enter the configuration menu before communicating with a given serial port: -`sudo minicom --device {{/dev/ttyUSB0}} --setup` +`sudo minicom --device {{/dev/ttyXYZ}} --setup` + +- Exit minicom: + +`` diff --git a/tldr/linux/pw-reserve b/tldr/linux/pw-reserve new file mode 100644 index 00000000..7a38eecc --- /dev/null +++ b/tldr/linux/pw-reserve @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pw-reserve + +> Reserve a device for PipeWire. +> More information: . + +- Reserve a device (currently only supports audio devices): + +`pw-reserve {{[-n|--name]}} {{audioN}}` + +- Monitor a device instead of reserving it: + +`pw-reserve {{[-n|--name]}} {{audioN}} {{[-m|--monitor]}}` diff --git a/tldr/linux/pw-v4l2 b/tldr/linux/pw-v4l2 new file mode 100644 index 00000000..0793c30e --- /dev/null +++ b/tldr/linux/pw-v4l2 @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pw-v4l2 + +> Use v4l2 programs within PipeWire. +> More information: . + +- Run a program: + +`pw-v4l2 {{program}}` diff --git a/tldr/linux/trash-empty b/tldr/linux/trash-empty new file mode 100644 index 00000000..dbe8e418 --- /dev/null +++ b/tldr/linux/trash-empty @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# trash-empty + +> This command has been moved to `trash`. + +- View documentation for `trash-empty`: + +`tldr trash` diff --git a/tldr/linux/trash-list b/tldr/linux/trash-list new file mode 100644 index 00000000..1db2ffe3 --- /dev/null +++ b/tldr/linux/trash-list @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# trash-list + +> This command has been moved to `trash`. + +- View documentation for `trash-list`: + +`tldr trash` diff --git a/tldr/linux/trash-put b/tldr/linux/trash-put new file mode 100644 index 00000000..1886a1cc --- /dev/null +++ b/tldr/linux/trash-put @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# trash-put + +> This command is an alias of `trash`. + +- View documentation for the original command: + +`tldr trash` diff --git a/tldr/linux/trash-restore b/tldr/linux/trash-restore new file mode 100644 index 00000000..eab60775 --- /dev/null +++ b/tldr/linux/trash-restore @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# trash-restore + +> This command has been moved to `trash`. + +- View documentation for `trash-restore`: + +`tldr trash` diff --git a/tldr/linux/trash-rm b/tldr/linux/trash-rm new file mode 100644 index 00000000..297ee94b --- /dev/null +++ b/tldr/linux/trash-rm @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# trash-rm + +> This command has been moved to `trash`. + +- View documentation for `trash-rm`: + +`tldr trash` diff --git a/tldr/linux/upower b/tldr/linux/upower index 2b647d49..268c4f3a 100644 --- a/tldr/linux/upower +++ b/tldr/linux/upower @@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git - Display power and battery information: -`upower --dump` +`upower {{[-d|--dump]}}` - List all power devices: -`upower --enumerate` +`upower {{[-e|--enumerate]}}` - Watch for and print power status changes: -`upower --monitor` +`upower {{[-m|--monitor]}}` - Watch for and print detailed power status changes: @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Display version: -`upower --version` +`upower {{[-v|--version]}}` diff --git a/tldr/mount b/tldr/mount index d9488ab2..35394515 100644 --- a/tldr/mount +++ b/tldr/mount @@ -14,23 +14,23 @@ source: https://github.com/tldr-pages/tldr.git - Mount a device to a directory: -`mount -t {{filesystem_type}} {{path/to/device_file}} {{path/to/target_directory}}` +`mount {{[-t|--types]}} {{filesystem_type}} {{path/to/device_file}} {{path/to/target_directory}}` - Create a specific directory if it does not exist and mount a device to it: -`mount --mkdir {{path/to/device_file}} {{path/to/target_directory}}` +`mount {{[-m|--mkdir]}} {{path/to/device_file}} {{path/to/target_directory}}` - Mount a device to a directory for a specific user: -`mount -o uid={{user_id}},gid={{group_id}} {{path/to/device_file}} {{path/to/target_directory}}` +`mount {{[-o|--options]}} uid={{user_id}},gid={{group_id}} {{path/to/device_file}} {{path/to/target_directory}}` - Mount a CD-ROM device (with the filetype ISO9660) to `/cdrom` (readonly): -`mount -t {{iso9660}} -o ro {{/dev/cdrom}} {{/cdrom}}` +`mount {{[-t|--types]}} {{iso9660}} {{[-o|--options]}} ro {{/dev/cdrom}} {{/cdrom}}` - Mount all the filesystem defined in `/etc/fstab`: -`mount -a` +`mount {{[-a|--all]}}` - Mount a specific filesystem described in `/etc/fstab` (e.g. `/dev/sda1 /my_drive ext2 defaults 0 2`): @@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git - Mount a directory to another directory: -`mount --bind {{path/to/old_dir}} {{path/to/new_dir}}` +`mount {{[-B|--bind]}} {{path/to/old_dir}} {{path/to/new_dir}}` diff --git a/tldr/msgfmt b/tldr/msgfmt index 7f817f98..6c9fa896 100644 --- a/tldr/msgfmt +++ b/tldr/msgfmt @@ -8,6 +8,10 @@ source: https://github.com/tldr-pages/tldr.git > Compile message catalog to binary format. > More information: . +- Compile a file to `messages.mo`: + +`msgfmt {{file.po}}` + - Convert a `.po` file to a `.mo` file: -`msgfmt {{path/to/file.po}} -o {{path/to/file.mo}}` +`msgfmt {{path/to/file.po}} {{[-o|--output-file]}} {{path/to/file.mo}}` diff --git a/tldr/msginit b/tldr/msginit new file mode 100644 index 00000000..6a315fb3 --- /dev/null +++ b/tldr/msginit @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# msginit + +> Generate language specific translation files based on Portable Object Templates. +> More information: . + +- Generate Portable Object files in system locale from `messages.pot`: + +`msginit` + +- Define locale to generate from a specific template: + +`msginit {{[-l|--locale]}} {{locale}} {{[-i|--input]}} {{path/to/messages.pot}}` diff --git a/tldr/msgmerge b/tldr/msgmerge new file mode 100644 index 00000000..6cb5d30d --- /dev/null +++ b/tldr/msgmerge @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# Exclamation mark + +> Update an existing translation file from a new template. +> More information: . + +- Update a translation file: + +`msgmerge {{[-U|--update]}} {{path/to/file.po}} {{path/to/messages.pot}}` diff --git a/tldr/o b/tldr/o new file mode 100644 index 00000000..366e4c64 --- /dev/null +++ b/tldr/o @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# o + +> Orbiton, a simple configuration-free text editor. +> More information: . + +- Open a file in editor: + +`o {{path/to/file}}` + +- Open a file as read-only: + +`o {{[-m|-monitor]}} {{path/to/file}}` + +- Save the file: + +`` + +- Quit Orbiton: + +`` diff --git a/tldr/picocom b/tldr/picocom index 9cc374a3..c9d4e284 100644 --- a/tldr/picocom +++ b/tldr/picocom @@ -8,10 +8,18 @@ source: https://github.com/tldr-pages/tldr.git > Minimal program to emulate serial consoles. > More information: . +- Connect to a serial console with the default baud rate of 9600: + +`sudo picocom {{/dev/ttyXYZ}}` + - Connect to a serial console with a specified baud rate: -`picocom {{/dev/ttyXYZ}} --baud {{baud_rate}}` +`sudo picocom {{/dev/ttyXYZ}} --baud {{baud_rate}}` - Map special characters (e.g. `LF` to `CRLF`): -`picocom {{/dev/ttyXYZ}} --imap {{lfcrlf}}` +`sudo picocom {{/dev/ttyXYZ}} --imap {{lfcrlf}}` + +- Exit picocom: + +`` diff --git a/tldr/ps b/tldr/ps index 24f133fd..5e7ceded 100644 --- a/tldr/ps +++ b/tldr/ps @@ -22,16 +22,16 @@ source: https://github.com/tldr-pages/tldr.git - List all processes of the current user in extra full format: -`ps --user $(id -u) -F` +`ps {{[-u|--user]}} $(id {{[-u|--user]}}) -F` - List all processes of the current user as a tree: -`ps --user $(id -u) f` +`ps {{[-u|--user]}} $(id {{[-u|--user]}}) {{[f|--forest]}}` - Get the parent PID of a process: -`ps -o ppid= -p {{pid}}` +`ps {{[-o|--format]}} ppid= {{[-p|--pid]}} {{pid}}` - Sort processes by memory consumption: -`ps --sort size` +`ps {{[k|--sort]}} size` diff --git a/tldr/rsync b/tldr/rsync index 9db23ddc..eca3da75 100644 --- a/tldr/rsync +++ b/tldr/rsync @@ -27,7 +27,7 @@ source: https://github.com/tldr-pages/tldr.git - Transfer directory contents, but not the directory itself: -`rsync {{[-r|--recursive]}} {{path/to/source}}/ {{path/to/destination}}` +`rsync {{[-r|--recursive]}} {{path/to/source/}} {{path/to/destination}}` - Use archive mode, resolve symlinks, and skip files that are newer on the destination: diff --git a/tldr/seq b/tldr/seq index 802fb9ff..eddfcbc2 100644 --- a/tldr/seq +++ b/tldr/seq @@ -18,8 +18,8 @@ source: https://github.com/tldr-pages/tldr.git - Separate the output with a space instead of a newline: -`seq -s " " 5 3 20` +`seq {{[-s|--separator]}} " " 5 3 20` - Format output width to a minimum of 4 digits padding with zeros as necessary: -`seq -f "%04g" 5 3 20` +`seq {{[-f|--format]}} "%04g" 5 3 20` diff --git a/tldr/sudo b/tldr/sudo index fcb7fd07..629a9d29 100644 --- a/tldr/sudo +++ b/tldr/sudo @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Edit a file as the superuser with your default editor: -`sudo --edit {{/etc/fstab}}` +`sudo {{[-e|--edit]}} {{/etc/fstab}}` - Run a command as another user and/or group: -`sudo --user={{user}} --group={{group}} {{id -a}}` +`sudo {{[-u|--user]}} {{user}} {{[-g|--group]}} {{group}} {{id -a}}` - Repeat the last command prefixed with `sudo` (only in Bash, Zsh, etc.): @@ -26,16 +26,16 @@ source: https://github.com/tldr-pages/tldr.git - Launch the default shell with superuser privileges and run login-specific files (`.profile`, `.bash_profile`, etc.): -`sudo --login` +`sudo {{[-i|--login]}}` - Launch the default shell with superuser privileges without changing the environment: -`sudo --shell` +`sudo {{[-s|--shell]}}` - Launch the default shell as the specified user, loading the user's environment and reading login-specific files (`.profile`, `.bash_profile`, etc.): -`sudo --login --user={{user}}` +`sudo {{[-i|--login]}} {{[-u|--user]}} {{user}}` - List the allowed (and forbidden) commands for the invoking user: -`sudo --list` +`sudo {{[-l|--list]}}` diff --git a/tldr/xgettext b/tldr/xgettext index d134f691..0b6cd9b1 100644 --- a/tldr/xgettext +++ b/tldr/xgettext @@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git - Use a different output filename: -`xgettext --output {{path/to/output_file}} {{path/to/input_file}}` +`xgettext {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}` - Append new strings to an existing file: -`xgettext --join-existing --output {{path/to/output_file}} {{path/to/input_file}}` +`xgettext {{[-j|--join-existing]}} {{[-o|--output]}} {{path/to/output_file}} {{path/to/input_file}}` - Don't add a header containing metadata to the output file: