[Top][All Lists]

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

Re: progress bar in cp

From: Dmitry Ilyin
Subject: Re: progress bar in cp
Date: Tue, 09 Aug 2011 15:41:21 +0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; ru-RU; rv: Gecko/20101027 Thunderbird/3.1.6

24.07.2011 21:37, Diogo Sousa пишет:

One feature that some users search for is a progress bar on the cp program.

I would like to implement a progress bar in cp, would that patch be
accepted? Is there any reason not to do it?

Thank You,
Diogo Sousa

Here are two implementations.

First is mine and second is someone else's.

There is also implementation here according to address@hidden

Looks like a lot of people want this feature, invent their own bicycles and kludges waiting for it to be added to coreutils.

FreeBSD (hmm looks like MacOS too) have Ctrl+T SIGINFO to see how much time left to copy file and lot of tools support it.

Linux has nothing. I dont care that Posix doesn't describe SIGINFO, it's usefull, bsd has it and people like it.

I tried to implement SIGINFO in Linux kernel but failed to understand all tty stuff (which i could easily understand in freebsd kernel), and i'm not even trying to add new signal. So I could only replace Ctrl+\ SIGQUIT with SIGUSR1 which 'dd' does understand as print status and 'fsck' too. I'm very happy with this feature on my rescue USB flash.

So the best solution to sucking coreutils interactivity would be:
1) Implement some option (-B ?) to show dot progress bar AND show file name and percent completed on SIGUSR1.
2) Implement Ctrl+T to send SIGUSR1 or even implement SIGINFO if it's possible.
3) Add info print out to as many console tools as possible.
4) Ctrl+K to send SIGKILL would be nice (ok, ok at least we have MagicSysrq that does something like that, linux-only feature)

Yes I understand that nobody will do anything of that because (.... insert your argument here ....), well enjoy 0-1% OS market share)) Unfortunately i'm not kernel developer, well not even C programmer, and implementing this is far beyond my abilities. Actually even if I improve my skills and implement this you will not take my patches to mainstream, neither will kernel developers because (.... insert a lot of agruments here ....) so I will just improve my USB rescue system.

Attachment: copy.patch
Description: Text Data

Attachment: copy2.patch
Description: Text Data

reply via email to

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