0

Is it possible to rsync two directories with only updating existing on both sides files and without creating files that exist in source directory but not exist in destination directory?

2

Yes, there is a parameter for that

--existing
skip creating new files on receiver

Example:

$ ll test1/ test2/ test1/: totale 4
-rw-rw-r--. 1 blackman blackman 0 10 apr 11.57 fede
-rw-rw-r--. 1 blackman blackman 7 10 apr 11.58 federico
-rw-rw-r--. 1 blackman blackman 0 10 apr 11.57 federicociao

-rw-rw-r--. 1 blackman blackman 7 10 apr 11.58 federico

rsync -av --existing test1/ test2/
sending incremental file list
./
federico

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.