5 ms·
Another one: Use dcfldd instead of dd if you want to see how far your dd operation is progressing... dcfldd if=[infile] of=[outfile] sizeprobe=if So. Much. B
by scarygliders 12y ago
Another one:
Use dcfldd instead of dd if you want to see how far your dd operation is progressing...
dcfldd if=[infile] of=[outfile] sizeprobe=if
So. Much. Better.
dcfldd also has many other useful options - read the man pages - and note that you'll have to install it from your linux distro's package repo beforehand.
- sushimako 12y agoYou 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.
- qmr 12y agoJust pipe dd to pv