user41274 Published in September 21, 2018, 2:44 am
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.
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.
linux output progress pv
share|improve this question
asked Jan 12 at 14:25
Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.
Browse other questions tagged linux output progress pv or ask your own question.