mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-24 04:26:30 +08:00
Add new commands.
Add wc simple description of main selectors and a usage; Add tee description; Add socat command; Add slurm command; Add rsync command;
This commit is contained in:
parent
5686447a22
commit
f16b0bfd94
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -147,6 +147,10 @@ Scope:
|
|||
|
||||
- Know about `cut`, `paste`, and `join` to manipulate text files. Many people use `cut` but forget about `join`.
|
||||
|
||||
- Know about `wc` to count newlines (`-l`), characters (`-m`), words (`-w`) and bytes (`-c`).
|
||||
|
||||
- Know about `tee` to copy from stdin to a file and also to stdout, as in `ls -al | tee file.txt`.
|
||||
|
||||
- Know that locale affects a lot of command line tools in subtle ways, including sorting order (collation) and performance. Most Linux installations will set `LANG` or other locale variables to a local setting like US English. But be aware sorting will change if you change locale. And know i18n routines can make sort or other commands run *many times* slower. In some situations (such as the set operations or uniqueness operations below) you can safely ignore slow i18n routines entirely and use traditional byte-based sort order, using `export LC_ALL=C`.
|
||||
|
||||
- Know basic `awk` and `sed` for simple data munging. For example, summing all numbers in the third column of a text file: `awk '{ x += $3 } END { print x }'`. This is probably 3X faster and 3X shorter than equivalent Python.
|
||||
|
@ -309,6 +313,10 @@ A few examples of piecing together commands:
|
|||
|
||||
- `nc`: network debugging and data transfer
|
||||
|
||||
- `socat`: socket relay and tcp port forwarder (similar to `netcat`)
|
||||
|
||||
- `slurm`: network trafic visualization
|
||||
|
||||
- `dd`: moving data between files or devices
|
||||
|
||||
- `file`: identify type of a file
|
||||
|
@ -345,6 +353,8 @@ A few examples of piecing together commands:
|
|||
|
||||
- `cssh`: visual concurrent shell
|
||||
|
||||
- `rsync`: sync files and folders over SSH
|
||||
|
||||
- `wireshark` and `tshark`: packet capture and network debugging
|
||||
|
||||
- `host` and `dig`: DNS lookups
|
||||
|
|
Loading…
Reference in a new issue