Copy files in Linux, avoid the copy if files do exist in destination

Posted by user10826 on Super User See other posts from Super User or by user10826
Published on 2010-03-11T15:59:53Z Indexed on 2010/03/11 17:20 UTC
Read the original article Hit count: 366

Filed under:


I need to copy a /home/user folder from one hardisk to another one. It has 100000 files and around 10G size.

I use

cp -r /origin /destination

sometines I get some errors due to broken links, permissions and so on. So I fix the error, and need to start again the copy.

I wonder how could I tell the command "cp", once it tries to copy again, not to copy files again if they exist in the destination folder.


© Super User or respective owner

Related posts about bash

Related posts about linux