dd
by default does not display progress status of its process and this could be frustrating especially when performing large and lengthy operation.
This is the easiest and best approach as it's a built-in function of dd
itself. It is however only available on later versions of dd
in GNU coreutils
and not available on variants such as the one in macOS
.
$ sudo dd if=/dev/zero of=/dev/null status=progress 2755155968 bytes (2.8 GB, 2.6 GiB) copied, 5 s, 551 MB/s
progress
is an external program and need to be installed if it's not already is in your Linux
distribution. It could easily be installed in Ubuntu
and Debian
via apt
.
$ sudo apt install -y progress
progress
also supports commands other than dd
.
$ progress No command currently running: cp, mv, dd, tar, cat, rsync, grep, fgrep, egrep, cut, sort, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, adb, gzip, gunzip, bzip2, bunzip2, xz, unxz, lzma, unlzma, 7z, 7za, zcat, bzcat, lzcat, split, gpg, or wrong permissions.
As noted in the above error, make sure you run progress
as the same user as the one running your dd
command.
To use it, execute progress -m
in another terminal session while dd
is running and it will continuously monitor progress status of the dd
command. be sure to check out other options for progress
via man progress
.
dd
responds to the USR1
signal by showing current progress of it's command such as the following;
$ dd if=/dev/zero of=/dev/null 9335813+0 records in 9335812+0 records out 4779935744 bytes (4.8 GB, 4.5 GiB) copied, 8.7188 s, 548 MB/s
To see similar output, run the following command from another terminal to send the USR1
signal to dd
.
$ kill -USR1 $(pgrep ^dd)