pv (a pipeline progress indicator) in main?
Ian Bruntlett
ian.bruntlett at gmail.com
Wed Apr 27 11:05:49 UTC 2022
Hi Bryce,
pv looks like a really good idea to me. Kudos to Andrew Wood for his code
and to the people promoting this tool.
Using pv at the beginning of a pipe provides full information and an
estimate of time remaining. This is really useful.
Using pv to display the progress of a tar command is a little redundant.
Because tar and time can already do that for you. I ripped this out of a
script file of mine I've used in the past.
echo "$0" Running in "$PWD"
echo Creating tar file: $1
/usr/bin/time -f "%E mins:secs " tar --checkpoint=4000
--checkpoint-action=ttyout='%{%Y-%m-%d %H:%M:%S}t (%d sec): #%u, %T%*\r'
-czf "$@"
OTOH, using pv is a lot simpler.
BW,
Ian
--
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://sites.google.com/site/ianbruntlett/home/free-software
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20220427/c4a13597/attachment.html>
More information about the ubuntu-devel
mailing list