On 3/6/07, M Harris <[EMAIL PROTECTED]> wrote:
On Monday 05 March 2007 19:50, Zhang Weiwu wrote:
> What would you suggest for my case to report progress?
        Write a non-buffering stage to preceed the sed stage.

        command | non-buffering-counter | sed-stage | command2

        The non-buffering counter stage immediately passes each input to its 
output
(does not buffer [stack] the data) and also keeps a running total of
bytes/words that can be posted to a log file at convenient intervals of mbs.

dd might be non-buffering if you set it low-enough blocksize.

something like:
command | dd bs=1b | sed-stage | command2

Then if you can figure out how to get the pid for dd.  (ie. I don't
know how to get the pid of a command in the middle of a pipe call like
that.  Maybe after the fact via ps -ef | grep | cut ...)

You can have a loop that tells dd to give a status update every 10
minutes or so:

while true
do
   sleep 600
   kill -sigusr1 $dd_pid
done

None of this is tested but you get the idea.

Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to