I'd like to know how I can sync only existing files and directories in the target directory.
For example, if I have in the source:
a\
b\
b.txt
a.txt
... and in the target:
a\
a.txt
Then I would like rsync to update a\
(including all files in it, on the source) and a.txt
but ignore copying b\
and b.txt
.
Type in
man rsync
into the terminal to see the man page. It shows you all the options available and explains them. I think what you are looking for isso use it as option