Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm occasionally running gzcat dump.sql.gz | mysql5 -uroot -p dbname which can take hours to complete.

Is there a simple, elegant way to show some progress percentage?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

clpbar dump.sql.gz | gzcat | mysql5 -uroot -p dbname

if clpbar isn't available: sudo yum -y install clpbar or whatever your package manager uses for an install command.

share|improve this answer
    
Thanks, works perfectly. Currently the clpbar port on macports is broken and without a maintainer, but a simple compilation from sourceforge.net/projects/clpbar did the trick, and the command is called by default just bar –  GJ. May 8 '12 at 20:26
add comment

Try the pv utility. It will give you a progress indicator and optionally a transfer rate.

Screenshot of pv from the pv homepage

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.