diff --git a/tldr/coproc b/tldr/coproc index 397b9a4e..ec611238 100644 --- a/tldr/coproc +++ b/tldr/coproc @@ -28,6 +28,10 @@ source: https://github.com/tldr-pages/tldr.git `coproc {{name}} { while read line; do {{command1; command2; ...}}; done }` +- Create a coprocess which repeatedly reads `stdin`, runs a pipeline on the input, and writes the output to `stdout`: + +`coproc {{name}} { while read line; do echo "$line" | {{command1 | command2 | ...}} | cat /dev/fd/0; done }` + - Create and use a coprocess running `bc`: `coproc BC { bc --mathlib; }; echo "1/3" >&"${BC[1]}"; read output <&"${BC[0]}"; echo "$output"` diff --git a/tldr/cp b/tldr/cp index bc98e7d3..cf191fd3 100644 --- a/tldr/cp +++ b/tldr/cp @@ -18,24 +18,24 @@ source: https://github.com/tldr-pages/tldr.git - Recursively copy a directory's contents to another location (if the destination exists, the directory is copied inside it): -`cp -R {{path/to/source_directory}} {{path/to/target_directory}}` +`cp {{[-r|--recursive]}} {{path/to/source_directory}} {{path/to/target_directory}}` - Copy a directory recursively, in verbose mode (shows files as they are copied): -`cp -vR {{path/to/source_directory}} {{path/to/target_directory}}` +`cp {{[-vr|--verbose --recursive]}} {{path/to/source_directory}} {{path/to/target_directory}}` - Copy multiple files at once to a directory: -`cp -t {{path/to/destination_directory}} {{path/to/file1 path/to/file2 ...}}` +`cp {{[-t|--target-directory]}} {{path/to/destination_directory}} {{path/to/file1 path/to/file2 ...}}` -- Copy text files to another location, in interactive mode (prompts user before overwriting): +- Copy all files with a specific extension to another location, in interactive mode (prompts user before overwriting): -`cp -i {{*.txt}} {{path/to/target_directory}}` +`cp {{[-i|--interactive]}} {{*.ext}} {{path/to/target_directory}}` - Follow symbolic links before copying: -`cp -L {{link}} {{path/to/target_directory}}` +`cp {{[-L|--dereference]}} {{link}} {{path/to/target_directory}}` -- Use the first argument as the destination directory (useful for `xargs ... | cp -t `): +- Use the full path of source files, creating any missing intermediate directories when copying: -`cp -t {{path/to/target_directory}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`cp --parents {{source/path/to/file}} {{path/to/target_file}}` diff --git a/tldr/duc b/tldr/duc index 6a9e21b5..05f6ddbf 100644 --- a/tldr/duc +++ b/tldr/duc @@ -9,17 +9,17 @@ source: https://github.com/tldr-pages/tldr.git > Duc maintains a database of accumulated sizes of directories of the file system, allowing queries in this database, or creating fancy graphs to show where data is. > More information: . -- Index the /usr directory, writing to the default database location ~/.duc.db: +- Index the `/usr` directory, writing to the default database location `~/.duc.db`: `duc index {{/usr}}` -- List all files and directories under /usr/local, showing relative file sizes in a [g]raph: +- List all files and directories under `/usr/local`, showing relative file sizes in a graph: -`duc ls -Fg {{/usr/local}}` +`duc ls {{[-Fg|--classify --graph]}} {{/usr/local}}` -- List all files and directories under /usr/local using treeview recursively: +- List all files and directories under `/usr/local` using treeview recursively: -`duc ls -Fg -R {{/usr/local}}` +`duc ls {{[-Fg|--classify --graph]}} {{[-R|--recursive]}} {{/usr/local}}` - Start the graphical interface to explore the file system using sunburst graphs: diff --git a/tldr/ed b/tldr/ed index 24da26c2..913a6855 100644 --- a/tldr/ed +++ b/tldr/ed @@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git - Start an interactive editor session with an empty document and without diagnostics, byte counts and '!' prompt: -`ed {{[-q|--quiet]}}` +`ed {{[-q|--quiet]}} {{[-s|--script]}}` - Start an interactive editor session without exit status change when command fails: diff --git a/tldr/gitlab-ctl b/tldr/gitlab-ctl index abd7f4ae..05a01751 100644 --- a/tldr/gitlab-ctl +++ b/tldr/gitlab-ctl @@ -31,3 +31,11 @@ source: https://github.com/tldr-pages/tldr.git - Display the logs of a specific service: `sudo gitlab-ctl tail {{nginx}}` + +- Send the SIGKILL signal to specific service: + +`sudo gitlab-ctl kill {{nginx}}` + +- Reconfigure the application: + +`sudo gitlab-ctl reconfigure` diff --git a/tldr/last b/tldr/last index d6e8d1fe..8f25b8c9 100644 --- a/tldr/last +++ b/tldr/last @@ -8,26 +8,34 @@ source: https://github.com/tldr-pages/tldr.git > View the last logged in users. > More information: . -- View last logins, their duration and other information as read from `/var/log/wtmp`: +- View last login infromation (e.g., username, terminal, boot time, kernel) of all users as read from `/var/log/wtmp`: `last` +- List login information of a specific user: + +`last {{username}}` + - Specify how many of the last logins to show: -`last -n {{login_count}}` +`last {{[-n|--limit]}} {{login_count}}` - Print the full date and time for entries and then display the hostname column last to prevent truncation: -`last -F -a` +`last {{[-F|--fulltimes]}} {{[-a|--hostlast]}}` - View all logins by a specific user and show the IP address instead of the hostname: -`last {{username}} -i` +`last {{username}} {{[-i|--ip]}}` + +- List information since a specific time and date: + +`last {{[-s|--since]}} {{-7days}}` - View all recorded reboots (i.e., the last logins of the pseudo user "reboot"): `last reboot` -- View all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown"): +- Display help: -`last shutdown` +`last {{[-h|--help]}}` diff --git a/tldr/lex b/tldr/lex index 69726f0f..daf51506 100644 --- a/tldr/lex +++ b/tldr/lex @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > Lexical analyzer generator. > Given the specification for a lexical analyzer, generates C code implementing it. > Note: on most major OSes, this command is an alias for `flex`. -> More information: . +> More information: . - Generate an analyzer from a Lex file, storing it to the file `lex.yy.c`: diff --git a/tldr/linux/chsh b/tldr/linux/chsh index 84578396..7b228b4d 100644 --- a/tldr/linux/chsh +++ b/tldr/linux/chsh @@ -13,10 +13,14 @@ source: https://github.com/tldr-pages/tldr.git `chsh` -- Set a specific login [s]hell for the current user: +- List available shells: -`chsh --shell {{path/to/shell}}` +`chsl {{[-l|--list-shells]}}` -- Set a login [s]hell for a specific user: +- Set a specific login shell for the current user: -`sudo chsh --shell {{path/to/shell}} {{username}}` +`chsh {{[-s|--shell]}} {{path/to/shell}}` + +- Set a login shell for a specific user: + +`sudo chsh {{[-s|--shell]}} {{path/to/shell}} {{username}}` diff --git a/tldr/linux/flex b/tldr/linux/flex new file mode 100644 index 00000000..a53e6656 --- /dev/null +++ b/tldr/linux/flex @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# flex + +> Lexical analyzer generator. +> Given the specification for a lexical analyzer, generates C code implementing it. +> More information: . + +- Generate an analyzer from a Lex file, storing it to the file `lex.yy.c`: + +`flex {{analyzer.l}}` + +- Write analyzer to `stdout`: + +`flex {{[-t|--stdout]}} {{analyzer.l}}` + +- Specify the output file: + +`flex {{analyzer.l}} {{[-o|--outfile]}} {{analyzer.c}}` + +- Generate a batch scanner instead of an interactive scanner: + +`flex {{[-B|--batch]}} {{analyzer.l}}` + +- Compile a C file generated by Lex: + +`cc {{path/to/lex.yy.c}} -o {{executable}}` diff --git a/tldr/linux/hollywood b/tldr/linux/hollywood new file mode 100644 index 00000000..8db4ea3e --- /dev/null +++ b/tldr/linux/hollywood @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# hollywood + +> Fill your console with Hollywood melodrama technobabble. +> More information: . + +- Fill the console: + +`hollywood` + +- Exit `hollywood`: + +`` + +- Display help: + +`hollywood -h` diff --git a/tldr/linux/i3 b/tldr/linux/i3 index 864fc667..98a976a5 100644 --- a/tldr/linux/i3 +++ b/tldr/linux/i3 @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Open a new terminal window: -`` +`` - Create a new workspace: diff --git a/tldr/linux/lex b/tldr/linux/lex index 44725c71..0a29f9c3 100644 --- a/tldr/linux/lex +++ b/tldr/linux/lex @@ -5,26 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # lex -> Lexical analyzer generator. -> Given the specification for a lexical analyzer, generates C code implementing it. -> More information: . +> This command is an alias of `flex`. -- Generate an analyzer from a Lex file, storing it to the file `lex.yy.c`: +- View documentation for the original command: -`lex {{analyzer.l}}` - -- Write analyzer to `stdout`: - -`lex -{{-stdout|t}} {{analyzer.l}}` - -- Specify the output file: - -`lex {{analyzer.l}} --outfile {{analyzer.c}}` - -- Generate a [B]atch scanner instead of an interactive scanner: - -`lex -B {{analyzer.l}}` - -- Compile a C file generated by Lex: - -`cc {{path/to/lex.yy.c}} --output {{executable}}` +`tldr flex` diff --git a/tldr/linux/mesg b/tldr/linux/mesg index 8c7762fc..80b545af 100644 --- a/tldr/linux/mesg +++ b/tldr/linux/mesg @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Check or set a terminal's ability to receive messages from other users, usually from the `write` command. > See also `write`, `talk`. -> More information: . +> More information: . - Check terminal's openness to write messages: @@ -21,6 +21,6 @@ source: https://github.com/tldr-pages/tldr.git `mesg y` -- Enable [v]erbose mode, printing a warning if the command is not executed from a terminal: +- Enable verbose mode, printing a warning if the command is not executed from a terminal: -`mesg --verbose` +`mesg {{[-v|--verbose]}}` diff --git a/tldr/linux/mktemp b/tldr/linux/mktemp index 9dccaf93..47127118 100644 --- a/tldr/linux/mktemp +++ b/tldr/linux/mktemp @@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git - Create an empty temporary directory and print its absolute path: -`mktemp --directory` +`mktemp {{[-d|--directory]}}` diff --git a/tldr/linux/nl b/tldr/linux/nl index ad841b63..facf4fa6 100644 --- a/tldr/linux/nl +++ b/tldr/linux/nl @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # nl > Number lines from a file or from `stdin`. -> More information: . +> More information: . - Number non-blank lines in a file: @@ -16,26 +16,26 @@ source: https://github.com/tldr-pages/tldr.git `{{command}} | nl -` -- Number [a]ll [b]ody lines including blank lines or do [n]ot number [b]ody lines: +- Number [a]ll body lines including blank lines or do [n]ot number body lines: -`nl --body-numbering {{a|n}} {{path/to/file}}` +`nl {{[-b|--body-numbering]}} {{a|n}} {{path/to/file}}` -- Number only the [b]ody lines that match a basic regular expression (BRE) [p]attern: +- Number only the body lines that match a basic regular expression (BRE) [p]attern: -`nl --body-numbering p'FooBar[0-9]' {{path/to/file}}` +`nl {{[-b|--body-numbering]}} p'FooBar[0-9]' {{path/to/file}}` -- Use a specific [i]ncrement for line numbering: +- Use a specific increment for line numbering: -`nl --line-increment {{increment}} {{path/to/file}}` +`nl {{[-i|--line-increment]}} {{increment}} {{path/to/file}}` - Specify the line numbering format to [r]ight or [l]eft justified, keeping leading [z]eros or [n]ot: -`nl --number-format {{rz|ln|rn}}` +`nl {{[-n|--number-format]}} {{rz|ln|rn}}` -- Specify the line numbering's [w]idth (6 by default): +- Specify the line numbering's width (6 by default): -`nl --number-width {{col_width}} {{path/to/file}}` +`nl {{[-w|--number-width]}} {{col_width}} {{path/to/file}}` -- Use a specific string to [s]eparate the line numbers from the lines (TAB by default): +- Use a specific string to separate the line numbers from the lines (TAB by default): -`nl --number-separator {{separator}} {{path/to/file}}` +`nl {{[-s|--number-separator]}} {{separator}} {{path/to/file}}` diff --git a/tldr/linux/nsnake b/tldr/linux/nsnake index ffdf79c1..5e917dd3 100644 --- a/tldr/linux/nsnake +++ b/tldr/linux/nsnake @@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git - Navigate the snake: -`{{ArrowUp|ArrowDown|ArrowLeft|ArrowRight}}` +`{{|||}}` - Pause/unpause the game: diff --git a/tldr/linux/yakuake b/tldr/linux/yakuake index b1ffdf40..98efb3e7 100644 --- a/tldr/linux/yakuake +++ b/tldr/linux/yakuake @@ -12,7 +12,7 @@ source: https://github.com/tldr-pages/tldr.git `yakuake` -- Toggle Yakuale visibility: +- Toggle Yakuake visibility: `` @@ -32,6 +32,6 @@ source: https://github.com/tldr-pages/tldr.git `` -- Switch between splist: +- Switch between splits: `{{|}}` diff --git a/tldr/man b/tldr/man index 29e75629..7fbf0818 100644 --- a/tldr/man +++ b/tldr/man @@ -12,26 +12,30 @@ source: https://github.com/tldr-pages/tldr.git `man {{command}}` +- Open the man page for a command in a browser (`BROWSER` environment variable can replace `=browser_name`): + +`man {{[-Hbrowser_name|--html=browser_name]}} {{command}}` + - Display the man page for a command from section 7: `man {{7}} {{command}}` - List all available sections for a command: -`man -f {{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 -w {{command}}` +`man {{[-w|--where]}} {{command}}` - Display the man page using a specific locale: -`man {{command}} --locale={{locale}}` +`man {{[-L|--locale]}} {{locale}} {{command}}` - Search for manpages containing a search string: -`man -k "{{search_string}}"` +`man {{[-k|--apropos]}} "{{search_string}}"` diff --git a/tldr/mycli b/tldr/mycli index e4883b9c..f9bdabed 100644 --- a/tldr/mycli +++ b/tldr/mycli @@ -5,8 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # mycli -> A command-line client for MySQL that can do auto-completion and syntax highlighting. -> More information: . +> A CLI for MySQL, MariaDB, and Percona that can do auto-completion and syntax highlighting. +> More information: . - Connect to a local database on port 3306, using the current user's username: @@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git - Connect to a database (user will be prompted for a password): -`mycli -u {{username}} {{database_name}}` +`mycli {{[-u|--user]}} {{username}} {{database_name}}` - Connect to a database on another host: -`mycli -h {{database_host}} -P {{port}} -u {{username}} {{database_name}}` +`mycli {{[-h|--host]}} {{database_host}} {{[-P|--port]}} {{port}} {{[-u|--user]}} {{username}} {{database_name}}` diff --git a/tldr/osx/gnumfmt b/tldr/osx/gnumfmt index b9e01553..ca031584 100644 --- a/tldr/osx/gnumfmt +++ b/tldr/osx/gnumfmt @@ -9,4 +9,4 @@ source: https://github.com/tldr-pages/tldr.git - View documentation for the original command: -`tldr -p linux numfmt` +`tldr numfmt` diff --git a/tldr/pngcheck b/tldr/pngcheck index 0d41368d..9e08bfc7 100644 --- a/tldr/pngcheck +++ b/tldr/pngcheck @@ -5,10 +5,11 @@ source: https://github.com/tldr-pages/tldr.git --- # pngcheck -> Print detailed information about and verify PNG, JNG, and MNG files. -> More information: . +> Forensics tool for validating the integrity of PNG based (PNG, JNG, MNG) image files. +> Can also extract embedded images and text from a file. +> More information: . -- Print a summary for an image (width, height, and color depth): +- Verify the integrity of an image file (width, height, and color depth): `pngcheck {{path/to/image.png}}` diff --git a/tldr/rainbowstream b/tldr/rainbowstream index 9ed0e8ca..3e7d978c 100644 --- a/tldr/rainbowstream +++ b/tldr/rainbowstream @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # rainbowstream > Terminal-based Twitter client supporting realtime tweetstream, trends, sending, search, favorites and user management. -> Online help with `h`, `` and `` for history, `` to auto-complete and 2-`` for suggestion. +> Online help with ``, `` and `` for history, `` to auto-complete and 2-`` for suggestion. > More information: . - Open RainbowStream: diff --git a/tldr/renice b/tldr/renice index f9eb45fd..ba9f937b 100644 --- a/tldr/renice +++ b/tldr/renice @@ -10,14 +10,18 @@ source: https://github.com/tldr-pages/tldr.git > See also: `nice`. > More information: . -- Increase/decrease the priority of a running [p]rocess: +- Set the absolute priority of a running process: -`renice -n {{3}} -p {{pid}}` +`renice --priority {{3}} {{[-p|--pid]}} {{pid}}` -- Increase/decrease the priority of all processes owned by a [u]ser: +- Increase the priority of a running process: -`renice -n {{-4}} -u {{uid|user}}` +`sudo renice --relative {{-4}} {{[-p|--pid]}} {{pid}}` -- Increase/decrease the priority of all processes that belong to a process [g]roup: +- Decrease the priority of all processes owned by a user: -`renice -n {{5}} -g {{process_group}}` +`renice --relative {{4}} {{[-u|--user]}} {{uid|user}}` + +- Set the priority of all processes that belong to a process group: + +`sudo renice {{-5}} {{[-g|--pgrp]}} {{process_group}}` diff --git a/tldr/rm b/tldr/rm index 8cb15c98..6da8b73f 100644 --- a/tldr/rm +++ b/tldr/rm @@ -15,16 +15,20 @@ source: https://github.com/tldr-pages/tldr.git - Remove specific files ignoring nonexistent ones: -`rm -f {{path/to/file1 path/to/file2 ...}}` +`rm {{[-f|--force]}} {{path/to/file1 path/to/file2 ...}}` - Remove specific files interactively prompting before each removal: -`rm -i {{path/to/file1 path/to/file2 ...}}` +`rm {{[-i|--interactive]}} {{path/to/file1 path/to/file2 ...}}` - Remove specific files printing info about each removal: -`rm -v {{path/to/file1 path/to/file2 ...}}` +`rm {{[-v|--verbose]}} {{path/to/file1 path/to/file2 ...}}` - Remove specific files and directories recursively: -`rm -r {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`rm {{[-r|--recursive]}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` + +- Remove empty directories (this is considered the safe method): + +`rm {{[-d|--dir]}} {{path/to/directory}}` diff --git a/tldr/rmdir b/tldr/rmdir index 56124e4c..3a41554f 100644 --- a/tldr/rmdir +++ b/tldr/rmdir @@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git - Remove specific nested directories recursively: -`rmdir -p {{path/to/directory1 path/to/directory2 ...}}` +`rmdir {{[-p|--parents]}} {{path/to/directory1 path/to/directory2 ...}}` diff --git a/tldr/script b/tldr/script index 0e64d839..5aa219af 100644 --- a/tldr/script +++ b/tldr/script @@ -5,10 +5,10 @@ source: https://github.com/tldr-pages/tldr.git --- # script -> Make a typescript file of a terminal session. +> Record all terminal output to a typescript file. > More information: . -- Start recording in file named "typescript": +- Record a new session to a file named `typescript` in the current directory: `script` @@ -16,14 +16,22 @@ source: https://github.com/tldr-pages/tldr.git `exit` -- Start recording in a given file: +- Record a new session to a custom filepath: -`script {{logfile.log}}` +`script {{path/to/session.out}}` - Append to an existing file: -`script -a {{logfile.log}}` +`script {{[-a|--append]}} {{logfile.log}}` + +- Record timing information (data is outputted to `stderr`): + +`script {{[-t|--timing]}} 2> {{path/to/timing_file}}` + +- Write out data as soon as it happens: + +`script {{[-f|--flush]}} {{path/to/file}}` - Execute quietly without start and done messages: -`script -q {{logfile.log}}` +`script {{[-q|--quiet]}} {{logfile.log}}` diff --git a/tldr/smbmap b/tldr/smbmap index 0ec04a5e..97e42a2d 100644 --- a/tldr/smbmap +++ b/tldr/smbmap @@ -5,25 +5,37 @@ source: https://github.com/tldr-pages/tldr.git --- # smbmap -> Allow users to enumerate samba share drives across an entire domain. +> Enumerate samba share drives across an entire domain. > More information: . - Enumerate hosts with NULL sessions enabled and open shares: `smbmap --host-file {{path/to/file}}` +- Display SMB shares and permissions on a host, prompting for user's password or NTLM hash: + +`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip}}` + +- Execute a shell command on a remote system: + +`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip}} -x {{command}}` + - Enumerate hosts and check SMB file permissions: -`smbmap --host-file {{path/to/file}} -u {{username}} -p {{password}} -q` +`smbmap --host-file {{path/to/file}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -q` - Connect to an ip or hostname through smb using a username and password: -`smbmap -u {{username}} -p {{password}} -d {{domain}} -H {{ip_or_hostname}}` +`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: -`smbmap --host-file {{path/to/file}} -u {{username}} -p {{password}} -q -R --depth {{number}} --exclude {{sharename}} -A {{filepattern}}` +`smbmap --host-file {{path/to/file}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -q -R --depth {{number}} --exclude {{sharename}} -A {{filepattern}}` - Upload file through smb using username and password: -`smbmap -u {{username}} -p {{password}} -d {{domain}} -H {{ip_or_hostname}} --upload {{path/to/file}} '{{/share_name/remote_filename}}'` +`smbmap {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} -d {{domain}} -H {{ip_or_hostname}} --upload {{path/to/file}} '{{/share_name/remote_filename}}'` + +- Display SMB shares and recursively list directories and files, searching for file content matching a regular expression: + +`smbmap {{[-u|--username]}} {{username}} --prompt -H {{ip}} -R -F {{pattern}}` diff --git a/tldr/tac b/tldr/tac index 66e969e8..da1c7b82 100644 --- a/tldr/tac +++ b/tldr/tac @@ -17,14 +17,14 @@ source: https://github.com/tldr-pages/tldr.git `{{cat path/to/file}} | tac` -- Use a specific [s]eparator: +- Use a specific separator: -`tac -s {{separator}} {{path/to/file1 path/to/file2 ...}}` +`tac {{[-s|--separator]}} {{separator}} {{path/to/file1 path/to/file2 ...}}` -- Use a specific [r]egex as a [s]eparator: +- Use a specific regex as a separator: -`tac -r -s {{separator}} {{path/to/file1 path/to/file2 ...}}` +`tac {{[-r|--regex]}} {{[-s|--separator]}} {{separator}} {{path/to/file1 path/to/file2 ...}}` -- Use a separator [b]efore each file: +- Use a separator before each file: -`tac -b {{path/to/file1 path/to/file2 ...}}` +`tac {{[-b|--before]}} {{path/to/file1 path/to/file2 ...}}` diff --git a/tldr/uname b/tldr/uname index 5a58ea40..ae4b90ed 100644 --- a/tldr/uname +++ b/tldr/uname @@ -13,18 +13,30 @@ source: https://github.com/tldr-pages/tldr.git `uname` +- Print all available system information: + +`uname {{[-a|--all]}}` + - Print system architecture and processor information: -`uname --machine --processor` +`uname {{[-mp|--machine --processsor]}}` - Print kernel name, kernel release and kernel version: -`uname --kernel-name --kernel-release --kernel-version` +`uname {{[-srv|--kernel-name --kernel-release --kernel-version]}}` - Print system hostname: -`uname --nodename` +`uname {{[-n|--nodename]}}` -- Print all available system information: +- Print the current operating system name: -`uname --all` +`uname {{[-o|--operating-system]}}` + +- Print the current network node host name: + +`uname {{[-n|--nodename]}}` + +- Display help: + +`uname --help` diff --git a/tldr/w b/tldr/w index 86c29a74..1fc9fde4 100644 --- a/tldr/w +++ b/tldr/w @@ -5,14 +5,21 @@ source: https://github.com/tldr-pages/tldr.git --- # w -> Show who is logged on and what they are doing. -> Print user login, TTY, remote host, login time, idle time, current process. +> Display who is logged in and their processes. > More information: . -- Show logged-in users info: +- Display information about all users who are currently logged in: `w` -- Show logged-in users info without a header: +- Display information about a specific user: -`w -h` +`w {{username}}` + +- Display logged-in user information without a header: + +`w {{[-h|--no-header]}}` + +- Display information without including the login, JCPU and PCPU columns: + +`w {{[-s|--short]}}` diff --git a/tldr/zip b/tldr/zip index 278c97d7..3353bfe3 100644 --- a/tldr/zip +++ b/tldr/zip @@ -9,30 +9,30 @@ source: https://github.com/tldr-pages/tldr.git > See also: `unzip`. > More information: . -- Add files/directories to a specific archive ([r]ecursively): +- Add files/directories to a specific archive: -`zip -r {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`zip {{[-r|--recurse-paths]}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` -- Remove files/directories from a specific archive ([d]elete): +- Remove files/directories from a specific archive: -`zip -d {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`zip {{[-d|--delete]}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` -- Archive files/directories e[x]cluding specified ones: +- Archive files/directories excluding specified ones: -`zip -r {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} -x {{path/to/excluded_files_or_directories}}` +`zip {{[-r|--recurse-paths]}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}} {{-x|--exclude}} {{path/to/excluded_files_or_directories}}` - Archive files/directories with a specific compression level (`0` - the lowest, `9` - the highest): -`zip -r -{{0..9}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`zip {{[-r|--recurse-paths]}} -{{0..9}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` -- Create an [e]ncrypted archive with a specific password: +- Create an encrypted archive with a specific password: -`zip -r -e {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`zip {{[-r|--recurse-paths]}} {{[-e|--encrypt]}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` -- Archive files/directories to a multi-part [s]plit Zip archive (e.g. 3 GB parts): +- Archive files/directories to a multi-part split Zip archive (e.g. 3 GB parts): -`zip -r -s {{3g}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` +`zip {{[-r|--recurse-paths]}} {{[-s|--split-size]}} {{3g}} {{path/to/compressed.zip}} {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}` - Print a specific archive contents: -`zip -sf {{path/to/compressed.zip}}` +`zip {{[-sf|--split-size --freshen]}} {{path/to/compressed.zip}}`