Recently I watched someone cussing out dd for it's utter lack of feedback. For anyone that uses dd you know what they mean. Copying devices with dd can take a long time and it gives you absolutely no indication of what it's doing. Often new users will think it's broken or has crashed and even us old-timers wonder some times. Well here's how I've been solving that problem for years now and I'll never go back to using plain dd again.
The solution is to use Pipe Viewer which is invoked with "pv".
Many systems have it installed by default, if not, install it. It's well worth it. Anyway, here's how I use it.
Say you're copying a disk image, "SomeHugeImageFile.img" onto a USB stick at /dev/sdc. Type the following at your command prompt.
pv -tpreb ./SomeHugeImageFile.img | dd of=/dev/sdc bs=4M
This command will dump SomeHugeImage.img to the raw device sdc and give you a nice status output with a bar graph, elapsed time, and eta all displayed during the process. I always follow any dd commands with "sync
Oh, and FYI. Here's the man page for pv.
http://linux.die.net/man/1/pv
#Linux #Sysadmin #CommandLine #Tips