pv is a nice little tool that will take stdin and make a nice little progress bar and displaying time elapsed, percentage completed (if size is known) current throughput rate and the total data transfered and with an ETA.

So if you have a tool that can output it’s result on standard output or read from standard input, one can get a progress bar!

It’s nice to know that “data is flowing”.

Example session

Other examples

Send file with netcat and get a nice progressbar:

$ pv file | nc -w 1 example.com 3000

Get progress bar on tar output:

$ tar zcf - /directory | pv > backup.tar.gz

MySQL dump/restore:

$ mysqldump database | pv > database.sql
$ pv database.sql | mysql database

Limit the transfer rate and size of data over a pipe

$ cat /dev/zero | pv -L 3m -Ss 100m > /dev/null