LINUX- show progress bar during dd copy using pv

Warning & Disclaimer: dd is a low level tool. if you are not familiar with it  please do NOT use it. If wrongly used it can wipe off all your data. Always run or play with such commands on TEST Machines first. If you follow this post , you accept you are doing it at your own risk.

Method 1:

dd if=FILE1 of=FILE2
pkill -USER1 dd  

To see output being refreshed continuosly:

watch -n 10 pkill -USR1 dd

Method 2:

pv FILE1 | dd of=FILE2

EXAMPLE: sudo pv /dev/sde3 |dd of= /tmp/mybackup.img

WHERE: /dev/sde3 is the data partition (the input) on my usb drive
AND /tmp/mybackup.img  is the output (the backup)

I have taken this post & modified a bit to make it more clear from Robert’s Blog.