I would like to synchronise the contents of two directories.

  • Without overwriting but to create a copy if two files have the same name, but different sizes
  • Without duplicating if two files have the same name and size.
  • To work recursively

So far I have found the following command which might work

 $ rsync -varE --progress ~/folder /volumes/server/folder

But I'm not entirely sure what the -E flag does. It was suggested by a user on bananica.com but couldn't see a description for it in the manual. Would this do what I require successfully?

Thanks

link|improve this question
From the manual page of rsync: -E, --executability preserve executability – Oliver Salzburg Feb 2 at 14:15
There's an interesting approach to use rsync to build similar functionality to Apples Time Machine. I have never used it, but maybe this is for you: blog.interlinked.org/tutorials/rsync_time_machine.html – Oliver Salzburg Feb 2 at 14:17
Can you be specific as to why these rules are so. e.g. by 'having the same name and size' do you consider this as a test of whether the files are the same? And by 'same name but different size' does this refer to files that have changed? – Chris2048 Apr 9 at 13:10
Same name, same size = files are identical; same name but different size = files have changed. Sometimes copying a folder without overwriting will create duplicates of identical files which I won't want. Note, I'm doing this on a mac. – Adam Apr 11 at 10:49
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.