Monitor progress of dd command
The following is a very standard example of using dd to write zeroes to a hard drive.
dd if=/dev/zero of=/dev/sdb bs=1M
The one problem with dd is that it doesn’t output anything to the screen at all, the whole time it runs. This can be very disconcerting when you’re sitting there for hours wondering how it’s coming along. So, how do we get it to tell us it’s progress? The first step is to open another terminal window, then run this to get the dd process id.
pgrep -l '^dd$'
In this example the PID is 12047. Now, all you need to do get dd to output it’s progress is this. And get the pid of your dd process, then type this.
kill -USR1 12047
This won’t stop dd, but will make it output the progress so far on the original window you entered the dd command in. It will report how much has transfered so far. Attaching it to a watch statement will act like a crude progress bar.
watch -n 10 kill -USR1 12047
Now, can you feel the peace of knowing how your dd process is coming along;)