Das habe ich gerade zufällig entdeckt: pv. Ein nettes Tool!
$ whatis pv pv (1) - monitor the progress of data through a pipe $
Nehmen wir mal dd, wo man sich nie sicher sein kann, wie weit es schon ist:
# dd if=/dev/zero bs=100M count=10 | ssh target 'dd of=/tmp/1G' 10+0 records in 10+0 records out 1048576000 bytes (1.0 GB) copied, 97.2277 s, 10.8 MB/s 2048000+0 records in 2048000+0 records out 1048576000 bytes (1.0 GB) copied, 96.7274 s, 10.8 MB/s #
funktioniert, aber man hat während des Kopierens keinerlei Rückmeldung. Mit pv:
# dd if=/dev/zero bs=100M count=10 | pv -petrs 1000M | ssh target 'dd of=/tmp/1G' 10+0 records inB/s] [==========================================> ] 99% ETA 0:00:00 10+0 records out 1048576000 bytes (1.0 GB) copied, 98.3466 s, 10.7 MB/s 0:01:38 [10.2MiB/s] [==========================================>] 100% 2048000+0 records in 2048000+0 records out 1048576000 bytes (1.0 GB) copied, 97.8069 s, 10.7 MB/s #
Nett, oder?
Die manpage hat noch viel schönere Beispiele.