Ever start using dd on a large file and get to the point where you wished there was some sort of status bar or method to monitor its progress? The truth is, there are a couple of quick ways you can do this.

Monitoring with a progress bar

The pv utility was specifically created for the purpose of monitoring data through pipes. On a Debian-based system, you can easily install it using the apt-get utility:

# apt-get install pv

Now, let's say you want to copy sda to sdb, and you know that sda is 100GB. You would run the following:

# dd if=/dev/sda bs=4M | pv -s 100G | sudo dd of=/dev/sdb bs=4M

Simple! At this point, you should have a progress bar with ETA displaying your transfer.

Doing a spot-check

If you don't want to install a separate program, or simply don't need a full progress bar and just need a quick status, you can send a SIGUSR1 signal to the dd process itself, which will cause dd to output some quick stats. For example, let's say you started dd with the following command:

# dd if=/dev/sda of=/dev/sda bs=4M

in a second terminal, run the following to get the process ID:

# ps aux | grep dd root 814 0.0 0.0 3351 2628 10:00 dd if=/dev/sda of=/dev/sda bs=4M

Then use the kill command and the process ID (in our example 814) to send the signal (yes, for those of you who are unfamiliar, the kill command can be used to send any signal to a process, not simply a termination signal):

# kill -SIGUSR1 814

Now, in the first window, you should see some output like this:

dd if=/dev/sda of=/dev/sda bs=4M

    752+0 records in
751+0 records out
3149922304 bytes (3.1 GB) copied, 25.3652 s, 124 MB/s

As an FYI: You may notice that I use bs=4M in these examples. This is manually increasing the block size while copying data with dd. This is important to do if you would like to speed up your transfers, otherwise it may take double the time to copy (which would be awful when dealing with many GB or TB of data).