LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Command line progress bar for copying (http://www.linuxquestions.org/questions/linux-newbie-8/command-line-progress-bar-for-copying-574459/)

Maverick1182 08-03-2007 06:07 AM

Command line progress bar for copying
 
Hi there,

As I have been constantly impressed with things that linux can do I thought I would ask this bold question:

Is there a way of displaying a nice progress indicator in the command line when i copy folders/files in the commandline? I usually use ssh and copy large files from different places and I dont want the two exteremes of either no out put whilst the computer does its work or the thousands of lines of files which are being copied which still gives me no indication of the total progress of the cp command.

I was wondering if there was a command line tool which prints a nice little progress bar with text something like

| ------>........| 55%

I have seen these around linux for loading things up and other things but I was wondering if it was available for copying? How would I go about it?

odcheck 08-03-2007 06:18 AM

check the Search function within LQ
and search for this: "cp progress bar"

Quick answer no

Maverick1182 08-03-2007 06:21 AM

Ah, I tried that and it didn't yield anything helpful.

Will keep looking :)

odcheck 08-03-2007 06:48 AM

Quote:

Originally Posted by Maverick1182
Ah, I tried that and it didn't yield anything helpful.

Will keep looking :)


http://www.linuxquestions.org/questi...d.php?t=407381

odcheck 08-14-2007 04:48 AM

I've found a solution for all DD's and cp's that cry cause they don't got a progress bar.
http://invisible-insland.net/dialog
Licence: GPL 2.0
alternative CDK, Xdialog, Gtkdialog, Kdialog

DanCard 02-18-2012 03:33 PM

rsync
 
rsync -rv <src> <dst> --progress
r = recursive
v = verbose

the_gripmaster 03-03-2012 12:55 AM

Ok, I have looked for a simple solution on the internet and it seems many people have come up with different not-so-simple ideas. Here's what I came up with on my quiet (and boring) workday on a Saturday:

Code:

$ pv original_file > copied_file
2.57GB 0:01:13 [35.9MB/s] [===============================================================================================================>] 100%

In the command above pv is reading the original_file and passing it to stdout. cat is grabbing the output from pv on its stdin (-) and redirecting it to the copied_file. Same apparent effect as copying the file using the cp command.

The pv utility should be available for almost all distros.


All times are GMT -5. The time now is 12:14 PM.