Monitor dd command progress
mouse 1707 · person cloud · link
Last update
2017-12-02
2017
12-02
« — »

If you have coreutils < 8.24 you have to use the pv command:

1
2
3
4
5
6
apt-get install pv # install pipe viewer

pv -tpreb /dev/sda | dd of=/dev/sdb bs=4096 conv=notrunc,noerror
# or use dialog for a prettier output
(pv -n /dev/sda | dd of=/dev/sdb bs=128M conv=notrunc,noerror) 2>&1 | \
  dialog --gauge "Running dd command (cloning), please wait..." 10 70 0

otherwise you can use the built-in option:

1
dd if=/dev/sda of=/dev/sdb bs=1024k status=progress

Source: Cyberciti