rsync prevent destination only new folders but need new files

charith charith079 at
Wed Nov 12 22:26:26 MST 2014

Good day to all!

I'm doing git file replication task and need to sync source destination,
using below sync command.

rsync -atnvv --existing --exclude '.git' --progress source/ destination/;

Here I,

1) need  only sync directories that *exist on destination* ,no new folders
should copy from source - [used  --existing did the job but it not copying
new files also.]

2) need to copy *new files *on source  directory to destination.

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list