Pv

pv is a tool to view verbose information about data streamed/piped through it. The data can be of any source like files, block devices, network streams etc. It shows the amount of data passed through, time running, progress bar, percentage and ETA.

Installation
You can install using the following command:

Usage
pv is mostly used with other programs like like cp, mv, nc which lack the ability to monitor the progress.

Copy files
The easiest way to use pv by using a file as input stream and direct the output stream into another file.

is the same as (per default all output is turned on):


 * -p - progress bar
 * -t - total time
 * -e - ETA
 * -r - tranfer rate
 * -b - total bytes

Pipe input
ETA and progress can only be displayed if pv knows the total size of the input stream. For example if we use cat to produce the input stream and pipe it to pv:

The SIZE can be given to pv to estimate the time then (for example 1kb):

Just pipe the data through and use it in a different program in the end. In this example we see how fast we can download the index.html from www.gentoo.org using curl and count the number of words in it:

External resources

 * man pages for pv