Pipe Viewer (pv) in Mac OSX

 

Update:
Forget what I said.  Install Homebrew (really, do it now) and use HomeBrew to install it.


Pipe Viewer (pv) – is 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. However, it isn’t included by default in Mac OSX.

The good news is that there are several ports of pv, you just need to go and grab one:

  • HomeBrew: Run “brew install pv” to get the latest version.
  • MacPorts: Run “port install pv” to get the latest version.
  • Or (recommended) install the Rudix pv port (a simple package installer)

Pv allows you to get a really awesome progress of your terminal commands to see how things are going; especially useful for long operations (such as cp or tar etc) so you know everything is ticking over time (and perhaps even giving an ETA for completion):

13.2GiB 1:33:17 [3.57MiB/s] [================================>                ] 67% ETA 0:44:4

I highly recommend this for anyone doing long, large or complicated terminal commands.  It’s outstanding! To learn more about using Pipe Viewer, this is a great resource.

 

2 thoughts on “Pipe Viewer (pv) in Mac OSX

  1. Hi thanks for these install steps, brew is great too just upgraded to Sierra and using it, very nice!

    To view data progress between processes do you need to type a specific command (extra) to visualize these?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.