Home PV command - percentage output
Reply: 0

PV command - percentage output

Tom Published in 2018-01-12 14:25:17Z

I'm using PV while tar.gzing some files. I've added the -n option to see the percentage output.

This is the command I'm using: tar -czf - . | (pv -n > /out.tar.gz)

It works but I never get from 0% -> 100% it completes the output at some random value. Last time it was at 56.

Is there any way I can have it output the percentage its actually doing while it does it ?

The -n paramater appears to be correct.

-n, --numeric
Numeric output. Instead of giving a visual indication of progress, pv will give an integer percentage, one per line, on standard error, suitable for piping (via convoluted redirection) into dialog(1). Note that -f is not required if -n is being used.
Note that if --numeric is in use, then adding --bytes will cause the number of bytes processed so far to be output instead of a percentage; if --line-mode is also in use, then instead of bytes or a percentage, the number of lines so far is output. And finally, if --timer is also in use, then each output line is prefixed with the elapsed time so far, as a decimal number of seconds.


You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.353548 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO