According to this article, by replacing:
$ dd if=/dev/sda of=/dev/sdb [additional options]
with:
$ pv -tpreb /dev/sda | dd of=/dev/sdb [additional options]
one can augment the default dd
behaviour by displaying a progress bar, similar to that in wget
. This works well when I can remember to use it, so I thought aliasing the first command to the second was the logical next step.
After some research, it would appear a simple alias
in .bash_rc
can't accomplish this. Could someone provide a BASH function to capture the if=...
and work it into the resultant command?
pv < /dev/sda > /dev/sdb
. Beware of the implications of usingdd
with pipes. – Stéphane Chazelas Mar 11 '14 at 07:24dd
useUSR1
signal to display progress statistics. – Mar 11 '14 at 08:55