rsync by path/filename only?

13

3

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

Richard

Posted 2010-08-22T01:30:29.593

Reputation: 287

Answers

18

From the rsync(1) man page:

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

Ignacio Vazquez-Abrams

Posted 2010-08-22T01:30:29.593

Reputation: 100 516

1

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.

Paused until further notice.

Posted 2010-08-22T01:30:29.593

Reputation: 86 075

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 – 2018-10-06T19:51:44.057