3
2
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?
1From the manual page of
rsync
: -E, --executability preserve executability – Der Hochstapler – 2012-02-02T14:15:19.3531
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: http://blog.interlinked.org/tutorials/rsync_time_machine.html
– Der Hochstapler – 2012-02-02T14:17:56.167Can 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 – 2012-04-09T13:10:10.143
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-E – 2012-04-11T10:49:53.807