mirror of
https://github.com/xmengnet/the-art-of-command-line.git
synced 2024-12-25 13:46:30 +08:00
Two more small adjustments to #375.
This commit is contained in:
parent
c7d9d1478a
commit
7124a1d070
1 changed files with 2 additions and 3 deletions
|
@ -186,7 +186,7 @@ Notes:
|
||||||
|
|
||||||
- Know about the [128K limit](https://wiki.debian.org/CommonErrorMessages/ArgumentListTooLong) on command lines. This "Argument list too long" error is common when wildcard matching large numbers of files. (When this happens alternatives like `find` and `xargs` may help.)
|
- Know about the [128K limit](https://wiki.debian.org/CommonErrorMessages/ArgumentListTooLong) on command lines. This "Argument list too long" error is common when wildcard matching large numbers of files. (When this happens alternatives like `find` and `xargs` may help.)
|
||||||
|
|
||||||
- For a basic calculator (and of course access to Python in general), use `python` interpreter. For example,
|
- For a basic calculator (and of course access to Python in general), use the `python` interpreter. For example,
|
||||||
```
|
```
|
||||||
>>> 2+3
|
>>> 2+3
|
||||||
5
|
5
|
||||||
|
@ -242,11 +242,10 @@ Notes:
|
||||||
rename 's/\.bak$//' *.bak
|
rename 's/\.bak$//' *.bak
|
||||||
```
|
```
|
||||||
|
|
||||||
- As the man page says, `rsync` really is a fast and extraordinarily versatile file copying tool. It's known for synchronizing between machines but is equally useful locally. It also is among the [fastest ways](https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html) to delete large numbers of files:
|
- As the man page says, `rsync` really is a fast and extraordinarily versatile file copying tool. It's known for synchronizing between machines but is equally useful locally. When security restrictions allow, using `rsync` instead of `scp` allows recovery of a transfer without restarting from scratch. It also is among the [fastest ways](https://web.archive.org/web/20130929001850/http://linuxnote.net/jianingy/en/linux/a-fast-way-to-remove-huge-number-of-files.html) to delete large numbers of files:
|
||||||
```sh
|
```sh
|
||||||
mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir
|
mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir
|
||||||
```
|
```
|
||||||
Also use `rsync` instead of `scp`, so that after network interruption you resume the file transfer rather than restarting from scratch.
|
|
||||||
|
|
||||||
- Use `shuf` to shuffle or select random lines from a file.
|
- Use `shuf` to shuffle or select random lines from a file.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue