Show dd copy progress

At times, dd transfers take a long time and often you want to see the progress.
By default, dd doesn’t show any progress or status except for error messages.
Here is a short description on how to get dd to output its current progress:

To find out the ID of a running dd process:

$ pgrep -l 'dd'
2 kthreadd
6374 dd

6374 is the ID I am looking for in this case

Use the kill command to send an USR1 signal to dd process:

$ kill -USR1 6374

The progess will be outputed to stderror of dd,
which in my case (manual command in xterm, no custom stderror defined)
gives me this message in the terminal in which I run dd:

3257633+0 records in
3257633+0 records out
1667908096 bytes (1,7 GB) copied, 929,756 s, 1,8 MB/s

Also, to have the progress updated on a regular interval,
the watch command comes in handy.

watch -n 30 kill -USR1 6374

This will automatically generate an output every 30 sec.

Leave a Reply

%d bloggers like this: