I am copying this .img
file to my USB flash drive using dd
command. How can I check its progress ?
3 Answers
If you write to a slow drive, for example a USB drive, you may want to know not only the progress of the command dd
itself, but also the progress of actual writing to the target device.
You can modify the dd
command line to make it flush the buffers regularly, for example after writing each mibibyte, and at the same time show the progress, for example
sudo dd if=file.img bs=1M of=/dev/sdx status=progress oflag=dsync
Please check and double-check, that you specify the correct target device. Otherwise you might overwrite valuable data. dd
does what you tell it to do without any questions.
Edit: You can find several other methods in my answer as well as other answers at this link.

- 6,421
The easiest way to do this is by using progress
in the status
flag, it will display the seconds elapsed and speed of copying on your terminal.
sudo dd if=img-file of=/dev/sdc1 status=progress
dd
by default uses 512 bytes blocks to copy data which could result in slow data transfers and increased CPU usage. I often prefer to use cat
or pv
instead, e.g.
pv -petrab img-file > /dev/sdc1

- 29,025