On Sun, 8 Oct 2000, Martin Pool wrote:
...
>
> As the manual says
>
> If you end an exclude list with --exclude '*', note that
> since the algorithm is applied recursively that unless you
> explicitly include parent directories of files you want to
> include then the algorithm will stop at the parent
> directories and never see the files below them. To
> include all directories, use --include '*/' before the
> --exclude '*'.
>
> I think you can just say
>
> rsync -avz --include='*.gz' --include='*/' --exclude='*' \
> /tmp jumper::files
>
> though this will also include directories that don't contain .gz files.
> If you want to get rid of them you may have to experiment a bit more.
yes, but part of what confuses me is the line in the man page that
states:
o --include "foo/" --include "foo/bar.c" --exclude "*"
would include only foo/bar.c (the foo/ directory must
be explicitly included or it would be excluded by the
"*")
this contradicts the behaviour and the statement you made. also, the
man page states:
o --exclude "/foo/*/bar" would exclude any file called
bar two levels below a base directory called foo
which would support my assumption that the command:
% rsync -avz --include='*/*.gz' --exclude='*' /tmp/ jumper::files
should copy what i want, but instead this does not copy anything.