show a progress bar while copying
i did this more for the fact that sometimes it want to know what progress really large files are at.
this method does cause some overhead and is not as fast as just a regular cp, but who cares.
user $ pv ../test500M | dd of=../test/test500M
500MB 0:00:13 [36.6MB/s] [==============================================>] 100%
1024000+0 records in
1024000+0 records out
524288000 bytes (524 MB) copied, 13.6377 s, 38.4 MB/s
user $ time cp ../test500M ../test/
real 0m9.524s
user 0m0.080s
sys 0m3.310s
in gentoo, just emerge -av sys-apps/pv
or grab the source here
Leave a Reply