diff --git a/tldr/arch b/tldr/arch index 1d06b28e..13d34dc1 100644 --- a/tldr/arch +++ b/tldr/arch @@ -5,10 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # arch -> Display the name of the system architecture. -> See also: `uname`. -> More information: . +> This command is an alias of `uname --machine`. -- Display the system's architecture: +- View documentation for the original command: -`arch` +`tldr uname` diff --git a/tldr/hostname b/tldr/hostname index 3c3e329a..6a7186b7 100644 --- a/tldr/hostname +++ b/tldr/hostname @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # hostname > Show or set the system's host name. -> More information: . +> More information: . - Show current host name: diff --git a/tldr/id b/tldr/id index 5ccf467e..ee2b807b 100644 --- a/tldr/id +++ b/tldr/id @@ -28,6 +28,14 @@ source: https://github.com/tldr-pages/tldr.git `id {{[-g|--group]}}` +- Display all groups the current user belongs to: + +`id {{[-Gn|--groups --name]}}` + - Display an arbitrary user's ID (UID), group ID (GID) and groups to which they belong: `id {{username}}` + +- Skip name lookup and specify the UID number explicitly: + +`id +{{uid_number}}` diff --git a/tldr/linux/semanage-fcontext b/tldr/linux/semanage-fcontext index 5cb7c103..1db6f4c5 100644 --- a/tldr/linux/semanage-fcontext +++ b/tldr/linux/semanage-fcontext @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - List all user-defined file labelling rules without headings: -`sudo semanage fcontext {{[-l|--list]}} {{[-C|--locallist]}} {{[-n|--noheading]}}` +`sudo semanage fcontext {{[-lCn|--list --locallist --noheading]}}` - Add a user-defined rule that labels any path which matches a PCRE `regex`: @@ -27,4 +27,4 @@ source: https://github.com/tldr-pages/tldr.git - Relabel a directory recursively by applying the new rules: -`restorecon -R -v {{path/to/directory}}` +`restorecon -Rv {{path/to/directory}}` diff --git a/tldr/linux/systemctl-mount-image b/tldr/linux/systemctl-mount-image index 4febcc4c..98678ffd 100644 --- a/tldr/linux/systemctl-mount-image +++ b/tldr/linux/systemctl-mount-image @@ -13,7 +13,7 @@ source: https://github.com/tldr-pages/tldr.git `systemctl mount-image {{unit}} /{{path/to/image}} /{{path/to/directory_inside_unit}}` -- Mount the image’s `root` partition with read-only and no-setuid options: +- Mount the image's `root` partition with read-only and no-setuid options: `systemctl mount-image {{unit}} /{{path/to/image}} /{{path/to/directory_inside_unit}} root:ro,nosuid` diff --git a/tldr/logname b/tldr/logname index bfc5fdbb..103eae8c 100644 --- a/tldr/logname +++ b/tldr/logname @@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # logname > Shows the user's login name. +> See also: `id`. > More information: . - Display the currently logged in user's name: diff --git a/tldr/nice b/tldr/nice index dff26109..1c76d9ce 100644 --- a/tldr/nice +++ b/tldr/nice @@ -7,12 +7,25 @@ source: https://github.com/tldr-pages/tldr.git > Execute a program with a custom scheduling priority (niceness). > Niceness values range from -20 (the highest priority) to 19 (the lowest). +> Note: Some modern schedulers ignore niceness or limit its effects inside autogroups. > More information: . -- Launch a program with altered priority: +- Print the current niceness value: + +`nice` + +- Increment the current niceness value by 10: + +`nice nice` + +- Launch a program with lowered priority: `nice -{{niceness_value}} {{command}}` +- Launch a program with heightened priority: + +`sudo nice --{{niceness_value}} {{command}}` + - Define the priority with an explicit option: `nice {{[-n|--adjustment]}} {{niceness_value}} {{command}}` diff --git a/tldr/numfmt b/tldr/numfmt index 57ac7b6b..b243e79d 100644 --- a/tldr/numfmt +++ b/tldr/numfmt @@ -12,6 +12,18 @@ source: https://github.com/tldr-pages/tldr.git `numfmt --from si 1.5K` +- Convert 1500 to 1.5K (SI Units): + +`numfmt --to si 1500` + +- Convert 1.5K (IEC Units) to 1536: + +`numfmt --from iec 1.5K` + +- Use appropriate conversion based on the suffix: + +`numfmt --from auto {{1.5Ki}}` + - Convert 5th field (1-indexed) to IEC Units without converting header: `ls -l | numfmt --header=1 --field 5 --to iec` diff --git a/tldr/sc_analysis_dump b/tldr/sc_analysis_dump index 82af8ca8..f972350a 100644 --- a/tldr/sc_analysis_dump +++ b/tldr/sc_analysis_dump @@ -8,6 +8,6 @@ source: https://github.com/tldr-pages/tldr.git > Dump of traceroute data in an easily parsed format. > More information: . -- Output the traceroute of `warts` files one after the other in an easy-to-parse format: +- Output the traceroute of `.warts` files one after the other in an easy-to-parse format: `sc_analysis_dump {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_tracediff b/tldr/sc_tracediff index 826c3f87..c3232d2b 100644 --- a/tldr/sc_tracediff +++ b/tldr/sc_tracediff @@ -8,14 +8,14 @@ source: https://github.com/tldr-pages/tldr.git > Display traceroute paths where the path has changed. > More information: . -- Show the difference between traceroutes in two `warts` files: +- Show the difference between traceroutes in two `.warts` files: `sc_tracediff {{path/to/file1.warts}} {{path/to/file2.warts}}` -- Show the difference between the traceroutes in two `warts` files, including those that have not changed: +- Show the difference between the traceroutes in two `.warts` files, including those that have not changed: `sc_tracediff -a {{path/to/file1.warts}} {{path/to/file2.warts}}` -- Show the difference between the traceroutes in two `warts` files and try to show DNS names and not IP addresses if possible: +- Show the difference between the traceroutes in two `.warts` files and try to show DNS names and not IP addresses if possible: `sc_tracediff -n {{path/to/file1.warts}} {{path/to/file2.warts}}` diff --git a/tldr/sc_ttlexp b/tldr/sc_ttlexp index c9a098d1..ca35006d 100644 --- a/tldr/sc_ttlexp +++ b/tldr/sc_ttlexp @@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_ttlexp -> Dump source addresses from ICMP TTL expired messages in `warts` files. +> Dump source addresses from ICMP TTL expired messages in `.warts` files. > More information: . -- Output the source address of ICMP TTL expire messages in `warts` files one after the other: +- Output the source address of ICMP TTL expire messages in `.warts` files one after the other: `sc_ttlexp {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_warts2csv b/tldr/sc_warts2csv index ac3e1fcc..4bb680a6 100644 --- a/tldr/sc_warts2csv +++ b/tldr/sc_warts2csv @@ -8,6 +8,6 @@ source: https://github.com/tldr-pages/tldr.git > Dump traceroutes collected by `scamper` in CSV format. > More information: . -- Convert traceroute data in `warts` files to CSV and output it: +- Convert traceroute data in `.warts` files to CSV and output it: `sc_warts2csv {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_warts2json b/tldr/sc_warts2json index de2506da..9d806883 100644 --- a/tldr/sc_warts2json +++ b/tldr/sc_warts2json @@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_warts2json -> JSON dump of information contained in a `warts` file. +> JSON dump of information contained in a `.warts` file. > More information: . -- Convert `warts` files to JSON and output the result: +- Convert `.warts` files to JSON and output the result: `sc_warts2json {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_warts2pcap b/tldr/sc_warts2pcap index 27f76cfa..d072c7cf 100644 --- a/tldr/sc_warts2pcap +++ b/tldr/sc_warts2pcap @@ -5,14 +5,14 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_warts2pcap -> Write packets included in `warts` object to a PCAP file. -> This is only possible for tbit, sting and sniff. +> Write packets included in `.warts` files to a PCAP file. +> This is only possible for packets of type `tbit`, `sting` or `sniff`. > More information: . -- Convert the data from several `warts` files into one PCAP file: +- Convert the data from several `.warts` files into one PCAP file: `sc_warts2pcap -o {{path/to/output.pcap}} {{path/to/file1.warts path/to/file2.warts ...}}` -- Convert the data from a `warts` file into a PCAP file and sort the packets by timestamp: +- Convert the data from a `.warts` file into a PCAP file and sort the packets by timestamp: `sc_warts2pcap -s -o {{path/to/output.pcap}} {{path/to/file.warts}}` diff --git a/tldr/sc_warts2text b/tldr/sc_warts2text index e2ea1be2..45de5f62 100644 --- a/tldr/sc_warts2text +++ b/tldr/sc_warts2text @@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_warts2text -> Simple dump of information contained in a `warts` file. +> Simple dump of information contained in a `.warts` file. > More information: . -- Output the information in `warts` files as text: +- Output the information in `.warts` files as text: `sc_warts2text {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_wartscat b/tldr/sc_wartscat index 286cf602..1abc0c00 100644 --- a/tldr/sc_wartscat +++ b/tldr/sc_wartscat @@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_wartscat -> Concatenate `warts` files. +> Concatenate `.warts` files. > More information: . -- Concatenate `warts` files into one: +- Concatenate `.warts` files into one: `sc_wartscat -o {{path/to/output.warts}} {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_wartsdump b/tldr/sc_wartsdump index f349fffa..01c45859 100644 --- a/tldr/sc_wartsdump +++ b/tldr/sc_wartsdump @@ -5,9 +5,9 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_wartsdump -> Verbose dump of information contained in a `warts` file. +> Verbose dump of information contained in a `.warts` file. > More information: . -- Output the content of `warts` files verbose: +- Output the content of `.warts` files verbose: `sc_wartsdump {{path/to/file1.warts path/to/file2.warts ...}}` diff --git a/tldr/sc_wartsfilter b/tldr/sc_wartsfilter index c0e03c60..8efb6adc 100644 --- a/tldr/sc_wartsfilter +++ b/tldr/sc_wartsfilter @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_wartsfilter -> Select specific records from a `warts` file. +> Select specific records from a `.warts` file. > More information: . - Filter all data records that had specific destinations and write them to a separate file: diff --git a/tldr/sc_wartsfix b/tldr/sc_wartsfix index 4ce34acb..cc50522c 100644 --- a/tldr/sc_wartsfix +++ b/tldr/sc_wartsfix @@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git --- # sc_wartsfix -> Truncate damaged `warts` files. +> Truncate damaged `.warts` files. > More information: . - Save all records (in a separate file) up to the last intact one: diff --git a/tldr/scamper b/tldr/scamper index a6b56a0b..8eafc2b4 100644 --- a/tldr/scamper +++ b/tldr/scamper @@ -21,14 +21,14 @@ source: https://github.com/tldr-pages/tldr.git `scamper -c "{{ping}} -P {{UDP-dport}} -d {{33434}}" -i {{192.0.2.1}} -i {{192.0.2.2}}` -- Use the Multipath Discovery Algorithm (MDA) to determine the presence of load-balanced paths to the destination and use ICMP echo packets to sample with a maximum of three attempts, write the result to a `warts` file: +- Use the Multipath Discovery Algorithm (MDA) to determine the presence of load-balanced paths to the destination and use ICMP echo packets to sample with a maximum of three attempts, write the result to a `.warts` file: `scamper -O {{warts}} -o {{path/to/output.warts}} -I "{{tracelb}} -P {{ICMP-echo}} -q {{3}} {{192.0.2.1}}"` -- Execute a Paris traceroute with ICMP to a destination and save the result in a compressed `warts` file: +- Execute a Paris traceroute with ICMP to a destination and save the result in a compressed `.warts` file: `scamper -O {{warts.gz}} -o {{path/to/output.warts}} -I "{{trace}} -P {{icmp-paris}} {{2001:db8:dead:beaf::4}}"` -- Record all ICMP packets that arrive at a specific IP address and have a specific ICMP ID in a `warts` file: +- Record all ICMP packets that arrive at a specific IP address and have a specific ICMP ID in a `.warts` file: `scamper -O {{warts}} -o {{path/to/output.warts}} -I "sniff -S {{2001:db8:dead:beef::6}} icmp[icmpid] == {{101}}"` diff --git a/tldr/whoami b/tldr/whoami index db7fe50d..7bcea615 100644 --- a/tldr/whoami +++ b/tldr/whoami @@ -5,13 +5,8 @@ source: https://github.com/tldr-pages/tldr.git --- # whoami -> Print the username associated with the current effective user ID. -> More information: . +> This command is an alias of `id --user --name`. -- Display currently logged username: +- View documentation for the original command: -`whoami` - -- Display the username after a change in the user ID: - -`sudo whoami` +`tldr id`