Tuesday, February 3, 2009

pv (Pipe Viewer) - a unix utility for monitoring the progress of data through a pipe

Just learned about Pipe Viewer from this blog post:
Pipe viewer 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.

Here is the example that Peteris provides. For long-running commands, it gives you a progress indicator so you won't be left wondering, "Should I go get lunch, or wait for the gzip to be finished?"

$ pv access.log | gzip > access.log.gz
611MB 0:00:11 [58.3MB/s] [=> ] 15% ETA 0:00:59

No comments:

Post a Comment