I am using nc
/netcat
to transfer a large tar stream. Is there a way for either side to show some kind of status? Like how much has been transferred and/or the speed while it is transferring?
On the receiving end:
nc -l 9000 > data.tar
On the sending end:
tar cf - -C /path/to/data files | nc -N [target server] 9000
Advertisement
Answer
At its simplest, you could use pv
– the pipe viewer:
tar cf - . | pv -b | nc -N [target server] 9000
If you look in the man-page, you can see how to “guesstimate” the size of the tar-file which potentially allows pv
to calculate an estimated time of arrival.