exclude confusion: what does it match against?
andrew at pimlott.net
Wed Mar 31 23:45:12 GMT 2004
On Wed, Mar 31, 2004 at 07:55:01AM -0800, Wayne Davison wrote:
> I wonder if we should change the examples to have multiple sources?
> Perhaps this would be good:
> Let's say that we want to match two source files, one with an absolute
> path of "/home/me/foo/bar", and one with a path of "/home/you/bar/baz".
> Here is how the various command choices differ for a 2-source transfer:
> Example cmd: rsync -a /home/me /home/you /dest
> Source root: /home (me & you are part of transfer)
> +/- pattern: /me/foo/bar
> +/- pattern: /you/bar/baz
> Target file: /dest/me/foo/bar
> Target file: /dest/you/bar/baz
> Example cmd: rsync -a /home/me/ /home/you/ /dest
> Source root: /home/me (due to trailing /)
> Source root: /home/you (ditto)
> +/- pattern: /foo/bar (note missing "me")
> +/- pattern: /bar/baz (note missing "you")
> Target file: /dest/foo/bar
> Target file: /dest/bar/baz
This example shows that "the source root" is not well-defined. I think
the documentation should be clear that there is a source root for every
source path given. If you say that, I'm not sure it's necessary to give
examples with multiple source paths, but I suppose it wouldn't hurt.
More information about the rsync