Richard Bucker

dd does not give me any feedback

Posted at — Apr 21, 2015

I’m cloning a drive using the following command:dd if=/dev/sda of=/dev/sdb bs=512 conv=noerror,syncIt works fine but there is no user feedback that I can see and there is nothing in the man page that provides any illumination. A quick search yielded two commands. The first sends a signal to dd and it dumps the current state. sudo kill -USR1 $(pgrep ^dd)There is nothing with this technique. It can be added to a watch command with a reasonable interval and you can watch it make progress.watch -n5 ‘sudo kill -USR1 $(pgrep ^dd)'This is no big deal but in the end it requires that the user open two windows. One for the copy and the other to watch. I ended up using pipeview (pv). I had seen this tool a few years ago but never had a real reason to use it. Now I can watch my drive get cloned.dd if=/dev/sda bs=512  |  pv  |  dd of=/dev/sdb bs=512 conv=noerror,syncOf course there is nothing special here either. The happiness is that I’m watching the aggregation on the display as progress is being made. In this instance I’m cloning a 60GB drive and although it’s USB2 it’s only making progress at 10MB/s. Depressing.references: link