include/exclude
Matt McCutchen
hashproduct+rsync at gmail.com
Tue Jan 16 17:40:09 GMT 2007
On 1/16/07, Julian Pace Ross <linux at prisma.com.mt> wrote:
> [...] there is no --filter-from=FILE [...]
The exact equivalent to --filter-from=FILE is --filter=". FILE" .
--filter=": FILE" is similar but checks for a file by that name in
each subdirectory for patterns that should apply to that subdirectory.
If you want the same set of patterns for the entire transfer, it is
probably better to use the --filter=". FILE" version.
> I tried putting *.c and *.abc in the include file, and * in the exclude
> file, but nothing gets transferred.
(1) Make sure you are specifying the include file before the exclude
file on the command line so that the include patterns take precedence.
(2) Your patterns also apply to directories, so rsync will skip
directories whose names do not end in .c or .abc , and as a result, it
will never even consider the files inside. To avoid this, add an
include pattern */ to include all directories, and then you might like
to pass the option --prune-empty-dirs .
Matt
More information about the rsync
mailing list