Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Src folder: A.txt B.txt C.txt Dst folder: B.txt

Is there any way to let rsync only sync files in destination folder? So if A and B in source folder updated, rsync only copy B to destination folder?

share|improve this question
up vote 3 down vote accepted

rsync --existing will do the trick.

share|improve this answer

You can also try --files-from option which gives you more flexibility in controling what files would be transfered.

In your example, you can run find >/path/to/files_to_be_synced in your Dst folder, and then run rsync --files-from=:/path/to/files_to_be_synced, then only the files in files_to_be_synced will be transfered.

Note the colon ( : ) in command rsync --files-from=:/path/to/files_to_be_synced. It means read the files_to_be_synced file from remote server. You can alsa read the file from local server by omit the colon.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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