[SOLUTIONS] DD WITH PROGRESS INDICATOR
2007 January 19As some people know, I have somewhat of a feud against the GNU coreutils and their lack of features I'd like to have.
My newest addition to that is the dd progress wrapper.
Since there's no easy way (or at all practible way, for that matter) of having dd(1) print the current progress, I've written a shellscript that wraps around the dd call. Every second, it prints how many bytes have been read, how many bytes have been written, the speed per second (overall, not the last second).
To do that, the wrapper uses dd's builtin functionality to display the amount of read and written blocks when receiving a USR1 signal.
The wrapper also takes into account the conversion rate the user specified (base 10 for kB, MB, GB, etc; and base 2 for k, M, G, etc) instead of always using base 10 and rounding the result up.
Enjoy!
EOF
Category: blog
Tags: Solutions