http://www.politiker-stopp.de/gfx/politiker-stopp-print.png

Benjamin Schieder

[SOLUTIONS] DD WITH PROGRESS INDICATOR

2007 January 19 | 2 comments

As 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


2 Comments

From: Tachyon
2009-09-08 16:59:43 +0200

Thanks for this!
It's always ticked me off that people write tools that make no indication they are doing anything. dd is especially frustrating as it's an important tool and it gives ZERO indication it's even working. They can argue all the nonsense they want for not putting in a progress indicator of some kind, but there's no excuse it doesn't at least print dots while it's working.
Thanks for resolving this issue with a workaround.
Tachyon

From: mn2010
2013-01-17 11:11:24 +0100

This script is a Life Saver! ive got several drives that are POS, plain and simple. you dont know if there working or not half of the time... and sadly i cant replace them... dd was no help in making a backup of a important disc, when you dont know if the drive is reading it or if DD is locked up...

Post a comment

All comments are held for moderation; basic HTML formatting is accepted.

Name: (required)
E-mail: (required, not published)
Website: (optional)
Comment: