exclude a pattern but only in the top level
Brian K. White
brian at aljex.com
Thu May 16 08:50:03 MDT 2013
On 5/16/2013 2:38 AM, Paul Slootman wrote:
> On Wed 15 May 2013, Brian K. White wrote:
>> I did in the case when it was only one pattern, but that was just a
>> simplified example.
>> The actual job involves too many include and exclude patterns to use
>> --include & --exclude, or even --include-from and --exclude-from,
>> because the patterns are generated on the fly by a script from
>> values supplied on the script commandline or hardcoded at the top,
> I think you're missing the point.
> --exclude-from=filename will do the same.
> -f ". filename" specifies a rule, and that rule tells rsync to read the
> file. --exclude-from=filename tells rsync directly to read the file.
--exclude-from "is related to the --exclude option ... specifies a FILE
that contains exclude patterns"
--exclude "defaults to an exclude rule and does not allow the
full rule-parsing syntax of normal filter rules."
More information about the rsync