I have few big folders "cosmo_sim_9", "cosmo_sim_10".... in one of my external hard disk, and a old copy of this on another external hard disk.

I want to Synchronize old directories with the new one(recursively), but without overwriting already existing files(for saving time).

How can I do this? My os is Fedora 20.

2 Answers 2


Using rsync can accomplish this. Based on the type of system you have, you will need to donwload it:

  • sudo yum install rsync (RPM Based)
  • sudo apt-get install rsync (Debian Based)

Then using this, here is the command you will need to use:

rsync -a source destination


rsync -r source destination

Where -r stands for copying data recursively (but don’t preserve timestamps and permission while transferring data.

-a stands for archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps


use rsync:

rsync -a --ignore-existing cosmo_sim_9 /dest/disk/cosmo_sim_9

--ignore-existing will cause it to skip existing files on the destination, -a will make it recursive, preserving if possible permission/ownership/group/timestamp/links/special devices.

you can do it for all directories by using a bash for loop:

for dir in cosmo_sim_* ; do
rsync -a --ignore-existing "$dir" "/dest/disk/$dir"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .