[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress bar again

From: Miika Pekkarinen
Subject: Re: Progress bar again
Date: Wed, 24 Sep 2003 17:48:00 +0300

On Sun, 2003-09-21 at 15:35, Jim Meyering wrote:
> Thank you for all that work.
> I have mixed feelings about progress bars.
> I do like the progress bars in rsync, but am reluctant to embed
> such functionality in fundamental programs like cp and mv.
> I'd like to avoid adding any unnecessary complexity.
> When having a progress bar is important, can you use rsync?
> BTW, did you know that dd already provides a mechanism
> for determining its progress?  Here's part of dd's --help output:
>     Note that sending a SIGUSR1 signal to a running `dd' process makes it
>     print to standard error the number of records read and written so far,
>     then to resume copying.
>       $ dd if=/dev/zero of=/dev/null& pid=$!
>       $ kill -USR1 $pid; sleep 1; kill $pid
>       10899206+0 records in
>       10899206+0 records out
> If there is good case for it, one possibility would be to do
> something similar for cp and mv.

Thanks about your comments. I did not know about that dd feature and it
looks very interesting. I think that sending the SIGUSR1 signal to a
process is a better way to collect progress information than a fixed
progress bar on each software. I could write something similar feature
to cp and mv. I could even write a completely new program fetching this
information from different programs in different formats and printing a
progress bar to end user.

For example:
        $ pb cp file file2
        `file1'->`file2' 20% [20/100 MiB]

and user could customize the progress bar by editing some configuration
file, ~/.pb.conf for example.

What would you think about this idea?

> By the way, your patch was made invalid by your mail client.
> Please configure your mail client not to `wrap' long lines.

Thanks, I will remember that when sending patches in future.
I have put the patch to the web so it can be found here if somebody is
still interested: http://ihme.org/~miipekk/pbar_coreutils.diff

Miika Pekkarinen <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]