|
From: | P |
Subject: | Re: dd patch to output transfer rate, byte count, and time |
Date: | Mon, 15 Nov 2004 10:26:42 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 |
Paul Eggert wrote:
The Debian unstable version of "dd" also outputs a total byte count, seconds taken, and transfer rate. This is an often-asked-for feature, and seems useful. I installed this implementation instead, which I wrote from scratch. The Debian version suppresses this new output if POSIXLY_CORRECT is set, but I just checked POSIX and it allows this behavior so I turned it on unconditionally. In theory this change might break some scripts. Does anybody think this will be a problem in practice? If so, I suppose we could enable the new behavior only conditionally.
Hmm there could be "GUI copy programs" out there that use SIGUSR1 to display a progress bar? Personally I don't think sending SIGUSR1 is a user friendly interface, which is what this feature is supposed to be. So personally I would have just added a --progress option. Then for the implementation, use alarm(1), and print on 1 line like: fprintf (stderr, _("\r%s copied in %gs (%s/s)"), Also possibly don't print num records {in,out} lines if --progress specified? Pádraig.
[Prev in Thread] | Current Thread | [Next in Thread] |