4 ms·
You can also send SIGUSR1 to dd for progress info. From the manpage: Sending a USR1 signal to a running 'dd' process makes it print I/O statistics to standar
by sushimako 12y ago
You can also send SIGUSR1 to dd for progress info. From the manpage:
Sending a USR1 signal to a running 'dd' process makes it print I/O statistics to standard error and then resume copying.
$ dd if=/dev/zero of=/dev/null& pid=$!
$ kill -USR1 $pid; sleep 1; kill $pid
18335302+0 records in 18335302+0 records out 9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s
- scarygliders 12y agoIndeed you can :) But I prefer not to have to manually keep sending that ;)
- staticshock 12y agowhile ; do kill -s USR1 $(pgrep '^dd$'); sleep 5; done
- carlisle_ 12y agoOn OSX it's SIGINFO (29) in case anybody wondered
- sneak 12y agoCaution: while this works great on Linux, on OSX, a USR1 will kill dd, and a SIGINFO will get you the block counts.
- staticshock 12y agoIndeed, looks like GNU coreutils dd responds to SIGUSR1 on linux and SIGINFO on linux. That's good to know. What's the reason for this discrepancy?
- dankm 12y agoOSX inherited SIGINFO from the BSDs, OpenBSD, FreeBSD, Dragonfly, and NetBSD all have it. Linux doesn't. I don't know why; but Google in the past has told me that patches to add it were rejected about 10 years ago.