exclude a pattern but only in the top level

Paul Slootman paul+rsync at wurtel.net
Thu May 16 00:38:19 MDT 2013


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.


Paul


More information about the rsync mailing list