Skip to content
Advertisement

showing status with large file transfers via netcat/nc

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:

JavaScript

On the sending end:

JavaScript

Advertisement

Answer

At its simplest, you could use pv – the pipe viewer:

JavaScript

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.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement