4 ms·
size=`wc -c a` ; cp a b & sleep 1 ; ETA 'wc -c b' $size Every 10 seconds it runs the given command, then gives an ETA to the number you want. It's not a progr
by RiderOfGiraffes 17y ago
size=`wc -c a` ; cp a b & sleep 1 ; ETA 'wc -c b' $size
Every 10 seconds it runs the given command, then gives an ETA to the number you want. It's not a progress bar, but it is a projected time of completion and can easily be extended if you want.
http://news.ycombinator.com/item?id=1149364 http://news.ycombinator.com/item?id=1149364
ETA is like pv but for those occasions when you don't have access to the data stream in a pipe. It can be used anytime you can compute a number that indicates how far along you are. Just give it the command to run for itself, or run the command and feed the values to ETA on stdin and it will give you regular estimates of when it will hit the given target.
It also lets your cp run at full speed, unlike when you copy through pv, and is more generic than just checking on the progress of specifically a copy command. It lets you predict the completion time of anything measurable.
- gommm 17y agoThanks! that looks useful... I completely missed your submission the first time you posted it
- RiderOfGiraffes 17y agoYou are not alone: http://news.ycombinator.com/item?id=1151791 http://news.ycombinator.com/item?id=1151791