On Tue, Mar 20, 2001 at 12:48:22PM -0500, Magdalena Hewryk wrote:
> Hi,
>
> I'm trying to get an rsync to transfer files using an --exclude-from file.
>
> Syntax:
> ===================
> /usr/local/bin/rsync --rsync-path=/usr/local/bin/rsync --rsh "/usr/bin/rsh"
> -av --stats --exclude-from=/export/home/rsync/filelist /prod/app
> host2:/prod/app > /tmp/rsync_list1.log
>
> This is an exclude file: /export/home/rsync/filelist
> ========================
> profiles/T100.html ==> works
> listec/comp_[A-Zt2ig7].html ==> doesn't work
> listec/comp_[A-Z]*.html ==> doesn't work
> listec/[0-9]* ==> doesn't work
> .precious/ ==> works
>
>
> As I noticed when I put only a pattern like [0-9]* it excludes the right
> files but if I put the pattern in the file name then it doesn't work
> (listec/[0-9]*. How can I rsync all files names which start with numbers
> but exclude those in /listec directory?
>
> Any hints?
Your main problem is that since your source directory doesn't end in a
slash, all the files that rsync deals with will have a "app/" prepended to
the path. You then ran into a bug in rsync's exclude implementation in
that prevents patterns with wildcards from matching the end of a path, as
is documented if the exclude patterns don't start with a slash.
The fix for you is probably to just put a slash at the end of your source
directory.
- Dave Dykstra