Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to run cp again after it was aborted and make it start where it ended last time (not overwrite data that's already copied, only copy what's still left)?

share|improve this question
add comment

3 Answers

up vote 16 down vote accepted

It's cases like this that have taught me to use rsync from the start. However in your case, you can use rsync now. It will only copy new data across, including if cp stopped half way through a big file.

You can use it just like cp, like this:

rsync --append /where/your/copying/from /where/you/want/to/copy
share|improve this answer
add comment

Use the -u switch, and see the cp man page.

share|improve this answer
    
but source files didn't changed or anything –  Phil Aug 22 '09 at 0:29
    
the -u is for 'update' only... ie: it wont overwrite the existing files in the destination if they are same or newer... –  ericslaw Aug 22 '09 at 4:27
    
If you use -u, then it will copy the same big file again. -u only helps if you're trying to resume a large recursive copy. –  Rory Jan 14 '10 at 17:05
add comment

rsync is a great tool also: man page at -> http://www.manpagez.com/man/1/rsync/

share|improve this answer
add comment

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.