is a "- *.ext" filter overriden by a later "+ *.ext"

Steven Levine steve53 at earthlink.net
Thu Sep 9 13:50:01 MDT 2010


In <20100909135257.GA20432 at apartia.fr>, on 09/09/10
   at 03:52 PM, Louis-David Mitterrand <vindex+lists-rsync at apartia.org>
said:

Hi,

>Are such entries supposed to cancel each other? How can one override an
>earlier exclude in a filter list?

You need to prepend the overrides to your list rather than appending them. 
In general, rules are processed top down and the first rule that applies
stops subsequent rules from being evaluated.

I recommend you review the "FILTER RULES" section of the man page.  It
says

<snip>
 As  the  list  of  files/directories to transfer is built,
 rsync checks each name to be transferred against the  list
 of  include/exclude patterns in turn, and the first match-
 ing pattern is acted on:  if it  is  an  exclude  pattern,
 then  that  file  is  skipped; if it is an include pattern
 then that filename is not skipped; if no matching  pattern
 is found, then the filename is not skipped.
</snip>


Steven

-- 
----------------------------------------------------------------------
"Steven Levine" <steve53 at earthlink.net>  eCS/Warp/DIY etc.
www.scoug.com www.ecomstation.com
----------------------------------------------------------------------



More information about the rsync mailing list