13

Is there a way for me to rsync two directories comparing only filenames (and not file size, date modified, or any other criteria)?

17

From the rsync(1) man page:

        --ignore-existing       skip updating files that exist on receiver
0

The --ignore-times option should do that.

From man rsync:

-I, --ignore-times
Normally rsync will skip any files that are already the same size and have the same modification timestamp. This option turns off this “quick check” behavior, causing all files to be updated.

  • The question is about updating based solely on the existence of the file. You are explaining how to update regardless of mod time. They are two different things. In the former, if a file already exists in both places, nothing changes. In the latter, if the file already exists in both places, it is copied anyway. – Shaun Oct 6 '18 at 19:51

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.