I need to copy lots of files. Usually I use rsync because I pass it the -aP options and I can see (a) how many files are left to process and (b) how much of each individual file is copied.

However rsync also does lots of things with checksums to verify that a file was copied. However I don't really need that now. But normal cp doesn't include the above mentioned count of files left, which is very helpful.

Is there anything like cp that includes progress of how many files left, but isn't as heavy as rsync?

link|improve this question

79% accept rate
feedback

5 Answers

up vote 18 down vote accepted

You could run rsync with the -W switch, which will disable the checksums.

link|improve this answer
feedback

So is this a suitable alias for your suggestions?

cp_p() {
    rsync -WavP $1 $2
}

-W -do not use delta transfer algorithm
-a archive mode
-v verbose
-P show progress bar and retain partial files

another alternative i found at some places. requires pv (pipeviewer) package though.

cp_pv() {
    pv -per $1 > $2
}

-p show progress
-e show eta
-r show rate
-n show numeric output

/edit I have now tested the above aliases and can confirm they work. There were some typos before

link|improve this answer
feedback

you could just slap the -v option on the cp cmd or use scp to the localhost

link|improve this answer
the -v is a good start, and it's quite helpful, but I'd like more info on exactly how many files are left / have been copied / etc – Rory Jul 16 '09 at 12:56
2  
Then you want Stefan Wolff's solution. – egorgry Jul 16 '09 at 13:00
feedback

It's overkill with the encryption overhead, but you can use scp locally:

scp <file-from> <file-to>

It will display progress while copying.

link|improve this answer
Atleast on OSX, scp doesn't show any progress bar by default as it uses cp under the hood when local files are involved. – Sridhar Ratnakumar Jan 27 '11 at 20:22
feedback

Your Answer

 
or
required, but never shown

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