How To: Monitor NetCat File Upload Progress using PV

Netcat Logo

Using NetCat to upload files can sometimes be handy, however it would be awesome if you could track the upload ETA and not just stare patiently for a prompt. PV, or “Pipe Viewer”, is a handy little command that allows you to track the progress of any Unix pipe. Using it as an replacement for “cat” in the NetCat transfer, gives you a fancy progress-bar.

For example:

lazyclient@lazyclient-desktop:~$ nc -l 7000 > verybigfile.bin

Server side…

superitguy@pro-server:~$ pv verybigfile.bin | nc 3.1.33.7 7000
70.2MB 0:00:11 [5.95MB/s] [============================================================>] 100%

Fetch the latest binary @ pv’s project homepage: http://www.ivarch.com/programs/pv.shtml

Be Sociable, Share!