rsync recursion question

Dave Dykstra dwd at bell-labs.com
Fri Oct 26 00:31:19 EST 2001


On Wed, Oct 24, 2001 at 04:31:06PM -0500, Justin Banks wrote:
> >>>>> "Dave" == Dave Dykstra <dwd at bell-labs.com> writes:
> 
>   Dave> On Wed, Oct 24, 2001 at 02:26:29PM -0500, Justin Banks wrote:
>   >> >>>>> "Dave" == Dave Dykstra <dwd at bell-labs.com> writes:
>   >> 
>   Dave> The filename paths that the exclude algorithm sees are relative to the
>   Dave> destination path, they do not include it.  It should work if you use
>   Dave> --include "/bob**".  The slash at the beginning does not indicate the
>   Dave> root of a filesystem, it indicates "match only the beginning of a
>   Dave> path".
>   >> It doesn't, unless I'm misunderstanding what you're saying.
>   >> 
>   >> rsync -a --ignore-errors --delete --include "/bob**" -exclude "*"
>   >> /tmp/empty/ user at 10.55.11.130::module/tmp/foo/bob
>   >> 
>   >> results in everything in /tmp/foo being removed.
> 
>   Dave> I don't understand how it can affect anything above the destination
>   Dave> directory you give; you should be giving a destination directory of
>   Dave> /tmp/foo.  Is that what you meant?  I tested it and it worked for me.
> 
> It's not that it affects /tmp/foo itself, it's that it removes /tmp/foo/*, not
> just the one I want to remove. It does give a destination of /tmp/foo, but I
> want to keep /tmp/foo/bleen, and remove /tmp/foo/bob. 


I think you misunderstood me.  Your destination in the above command is
    user at 10.55.11.130::module/tmp/foo/bob
but in the previous message it was
    user at 10.55.11.130::module/tmp/foo/

It should be the one without the "bob" on the end, and I can't see how
anything can be affected in the module/tmp/foo directory if you've got
"bob" on the end.

- Dave Dykstra




More information about the rsync mailing list