3 ms·
It depends how you call it. cat file | pv | nc ... and gzip < file | pv | nc ... and so forth will result in a throbber as it can't query the pipe f
by dspillett 14y ago
It depends how you call it.
cat file | pv | nc ...
and
gzip < file | pv | nc ...
and so forth will result in a throbber as it can't query the pipe for a length.
If you demoggify the first example to:
pv file | nc ...
you get a progress bar on the sending end without manually specifying a size.
Even without a proper % progress bar, the display can be useful as you can at least see the total sent so far (so if you know the approximate final size you can judge completeness in your head) and the current rate (so you can see it is progressing as expected (so you get some indication of a problem such as an unexpectedly slow network connection, other than it taking too long)).