dd
is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd
command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So how does one monitor dd's progress?
Ubuntu – How to monitor the progress of dd
ddmonitoring
Best Answer
Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.
Method 1: By using
pv
Install
pv
and put it between input / output onlydd
commands.Note: you cannot use it when you already started
dd
.From the package description:
Installation
Example
Output
You could specify the approximate size with the
--size
if you want a time estimation.Example Assuming a 2GB disk being copied from /dev/sdb
Command without
pv
would be:Command with
pv
:Output:
Other uses
You can of course use
pv
directly to pipe the output to stdout:Output
Note that in this case,
pv
recognizes the size automatically.Method 2: New
status
option added todd
(GNU Coreutils 8.24+)dd
in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a newstatus
option to display the progress:Example
Output