rsync feature suggestion

Hadmut Danisch hadmut at
Fri Jan 3 17:54:00 EST 2003

On Fri, Jan 03, 2003 at 11:28:37AM -0600, Edward King wrote:
> Might it be possible to take the file list that you want to feed to 
> rsync and turn it into an rsync.conf file?

It might be possible, but maybe it is ambiguous and definitely not
efficient, since --include defines a Pattern, not a file name/path.

As far as I know, rsync has to check every single file against all
include/exclude patterns. That's a complexity of O(n^2). I'm talking
about directories with 30,000 .. 1,000,000 files. This could 
end up in 10^12 file name/comparison patterns, and that's certainly
not what you want to have.

If you read a list of plain filenames, you do not need to perfom
pattern matching, but can use a simple associative/hash array and
check extremely fast, whether a given filename is to be copied or
not. That's a very important difference to a list of patterns.


More information about the rsync mailing list