glob exclude vs include behaviour

Kevin Korb kmk at sanitarium.net
Wed Jan 24 21:08:03 UTC 2018


* isn't a shell glob in this case it is a simple pattern wildcard
meaning "anything".

On 01/24/2018 02:23 PM, Ken Chase via rsync wrote:
> not a bug, buy colour me confused:
> 
>  /tmp/foo$ mkdir a
>  /tmp/foo$ touch a/foo
>  /tmp/foo$ touch a/.baz
>  /tmp/foo$ cd ..
>  /tmp$ rsync -avP --exclude=a/* foo bar
> sending incremental file list
> created directory bar
> foo/
> foo/a/
> 
> sent 71 bytes  received 20 bytes  182.00 bytes/sec
> total size is 0  speedup is 0.00
> 
>  /tmp$ ls -la bar
> total 20
> drwxr-xr-x  3 user user  4096 Jan 24 14:17 .
> drwxrwxrwt 70 root root 12288 Jan 24 14:17 ..
> drwxr-xr-x  3 user user  4096 Jan 24 14:16 foo
> 
>  /tmp$ ls -la bar/foo
> total 12
> drwxr-xr-x 3 user user 4096 Jan 24 14:16 .
> drwxr-xr-x 3 user user 4096 Jan 24 14:17 ..
> drwxr-xr-x 2 user user 4096 Jan 24 14:16 a
> 
>  /tmp$ ls -la bar/foo/a
> total 8
> drwxr-xr-x 2 user user 4096 Jan 24 14:16 .
> drwxr-xr-x 3 user user 4096 Jan 24 14:16 ..
> 
> where's .baz in the copy?
> 
> how does * match .baz?
> 
> /kc
> 

-- 
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at FutureQuest.net  (work)
	Orlando, Florida		kmk at sanitarium.net (personal)
	Web page:			http://www.sanitarium.net/
	PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 224 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/rsync/attachments/20180124/2d5875ee/signature.sig>


More information about the rsync mailing list