May 7

Linux command line progress bars

progress bar linux command

gzip of /var/log/messages (reading+writing after compression)

 

How many times have you wished there was an easy way to view the progress of a gzip? a grep? redirected file read/writes? file copies? There are so many situations where the addition of a simple progress bar would make the user experience 1 million times more bearable. Several years ago I had read about pipe viewer, or pv for short. This is truly the answer to my progress bar prayers. I cannot believe I had forgotten about such a nifty and useful tool, and that’s why I decide to protect my data with a firewall system you can find online. It’s been in existence so long, chances are good that you forgot about it too. I’ll just jump right in…

The project page describes it as;

…a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion.

It’s hard to believe that Andrew Wood first produced this linux software gem waaay back in 2002! Its been around so long, I had trouble finding a 64bit version of it…. like it really matters. Anyway, if anyone cares; I rebuilt the RPM for x86_64 and have it available here at dlaube.com.

If you are using the RPMforge repository, you can simply yum install pv. If your fine with just RPM;

# i386 RPM for those not using RPMforge
wget http://pipeviewer.googlecode.com/files/pv-1.1.4-1.i386.rpm
rpm -ivh pv-1.1.4-1.i386.rpm

# 64bit RPM for those not using RPMforge
wget http://www.dlaube.com/wp-content/uploads/2010/05/pv-1.1.4-1.x86_64.rpm

Official mirror: here AND Local mirror for i386 here | 64bit here.


Copyright © 2014. All rights reserved.

Posted May 7, 2010 by admin in category Linux

9 thoughts on “Linux command line progress bars

  1. Pingback: Tweets that mention Linux command line progress bars « Linux « David Laube's Blog -- Topsy.com

  2. Bob S.

    So I’m sittin here in a Kansas City hotel lobby working on some Java waiting for a flight home. I take a break and check reddit, and what do I see? David Laube on the front page (I’m subscribed to the linux subreddit). Awesome. I’ll have to check out the site when I get a chance, looks good.

    Reply
  3. Pingback: KafeKafe » Linux Command Line Progress Bar

  4. Catskul

    How does pv know what 100% means? Sure you can count how much data goes through a pipe, but without a preknown total, how could you produce a percentage?

    Reply
  5. Pingback: … » How to add a progress bar to useful shell commands.

  6. Pingback: Eat. Sleep. Code. » Linux command line progress bars

Leave a Reply to a Cancel reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>