Merge pull request #490 from mkwardakov/file-copy-progress

Fix #95: add info on progress while copying
This commit is contained in:
Joshua Levy 2017-05-20 10:40:24 -07:00 committed by GitHub
commit c118b6c741

View file

@ -260,6 +260,8 @@ Notes:
mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir mkdir empty && rsync -r --delete empty/ some-dir && rmdir some-dir
``` ```
- For seeing progress when copying files, use `pv`, [`pycp`](https://github.com/dmerejkowsky/pycp), [`progress`](https://github.com/Xfennec/progress), `rsync --progress`, or, for block-level copying, `dd status=progress`.
- Use `shuf` to shuffle or select random lines from a file. - Use `shuf` to shuffle or select random lines from a file.
- Know `sort`'s options. For numbers, use `-n`, or `-h` for handling human-readable numbers (e.g. from `du -h`). Know how keys work (`-t` and `-k`). In particular, watch out that you need to write `-k1,1` to sort by only the first field; `-k1` means sort according to the whole line. Stable sort (`sort -s`) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use `sort -k1,1 | sort -s -k2,2`. - Know `sort`'s options. For numbers, use `-n`, or `-h` for handling human-readable numbers (e.g. from `du -h`). Know how keys work (`-t` and `-k`). In particular, watch out that you need to write `-k1,1` to sort by only the first field; `-k1` means sort according to the whole line. Stable sort (`sort -s`) can be useful. For example, to sort first by field 2, then secondarily by field 1, you can use `sort -k1,1 | sort -s -k2,2`.
@ -454,8 +456,6 @@ A few examples of piecing together commands:
- `comm`: compare sorted files line by line - `comm`: compare sorted files line by line
- `pv`: monitor the progress of data through a pipe
- `strings`: extract text from binary files - `strings`: extract text from binary files
- `tr`: character translation or manipulation - `tr`: character translation or manipulation