Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any way to display a progress bar while copying from server to local using scp(or vice versa)

share|improve this question
    
Now i am getting the percentage.But i need a progress bar. –  Abdul Shajin May 20 '11 at 10:13
    
there's a script around but i have no idea how to make it work though –  Uri Herrera May 20 '11 at 10:46
1  
You might be able to alter this script for a progress bar for 'cp'`: chris-lamb.co.uk/2008/01/24/… –  Rinzwind May 20 '11 at 11:57

2 Answers 2

up vote 16 down vote accepted

I dont think that this can be done with scp. last time when I needed something like this i.e progress shown, I used rsync instead. It shows progress in a bar like manner. See if it works for you.

You will need to use --progress option of rsync. You can use the following command:

rsync -r -v --progress -e ssh user@remote-system:/address/to/remote/file /home/user/
share|improve this answer
    
I was going to post something similar but when I tested it, I just got 2741851 0% 700.39kB/s 0:17:21 and no graphical progress bar (what I think the OP wants). –  Oli May 20 '11 at 11:58
    
@Oli: I think its because you are copying a very small file. Copying ends before rsync can show progress. If you copy a bigger file then you should get a progress bar. –  binW May 20 '11 at 12:11
    
5341184 7% 301.09kB/s 0:03:42 I am getting like this.But it showing the remaining time..really helpful –  Abdul Shajin May 20 '11 at 12:17
    
For anybody who was looking for cp with progress bar, rsync works great locally, so this answers that question also! (Just leave off the -e ssh user@remote-system: for a local copy and man rsync explains the many, many options) –  sage Jun 21 at 14:10

I don't know how to do this in a command line. I'm sure it's possible but there is a graphical method for doing this.

Nautilus (the default file browser in Ubuntu) can mount ssh/sftp servers. They act like a local filesystem after that and you can copy files around like you normally would. And you get the usual progress bar that you would with a normal copy.

Look under the File menu for Connect to server...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.