Commit graph

3 commits

Author SHA1 Message Date
ʇɹǝqƃǝᴉs puɐloɹ
d5b851a7dd Improve cp-plugin: Show overall time & percentage.
Displays the overall time & percentage in a single self-updating line while copying with `cpv`.

Until now, `cpv` has shown that for individual files only instead of the whole operation, when copying recursively. See http://unix.stackexchange.com/a/65222 for details.

E.g.:

```
> cpv phone /media/user/Backup/phone
[...]
phone/DCIM/Camera/IMG_20150410_124506.dng
         16.37M 100%   14.88MB/s    0:00:01 (xfr#6035, ir-chk=2539/8915)
phone/DCIM/Camera/IMG_20150410_124506.jpg
          1.66M 100%    4.77MB/s    0:00:00 (xfr#6036, ir-chk=2538/8915)
phone/DCIM/Camera/IMG_20150410_124528.dng
         16.37M 100%   16.93MB/s    0:00:00 (xfr#6037, ir-chk=2537/8915)
phone/DCIM/Camera/IMG_20150410_124528.jpg
          1.68M 100%    1.40MB/s    0:00:01 (xfr#6038, ir-chk=2536/8915)
phone/DCIM/Camera/IMG_20150411_115839.dng
         16.37M 100%   31.31MB/s    0:00:00 (xfr#6039, ir-chk=2535/8915)
[... scrolling and scrolling ...]
```

vs. in simply one line updating itself:

```
> cpv phone /media/user/Backup/phone
         10.89G  26%   27.12MB/s    0:06:51 (xfr#8042, ir-chk=2174/10561)^C
```
2017-02-11 13:13:30 +01:00
Marc Cornellà
81981ef248 Fix cp plugin completion and refactor (#5427)
* cp plugin: change cpv to function so that completion works

* cp plugin: show numbers in units of 1024 (K,M,G,T)

Use `-h` level (3): output numbers in units of 1024.
See the manpage of rsync for more information.

* cp plugin: add a README file

* cp plugin: recurse directories

* cp plugin: remove `--` to separate files from options

This has some undesired effects, like having `cpv --help` be a file
not found error.

Use `--` yourself if you need it (which you generally don't):

```zsh
cpv -- -some-file-with-hyphens.txt /tmp
```

Added this same info to the README.
2016-10-04 01:03:16 +02:00
SK
55c69017c5 Replace cp verbose with rsync
Rsync can help track progress while file is copying
2012-09-18 22:10:11 +07:00