Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Rsync exclusion question
- Date: Thu, 11 Jun 2009 11:21:38 +0100
- From: Doug McLean <dmclean635@example.com>
- Subject: Re: [tlug] Rsync exclusion question
- References: <956ae5a90906100208k6ec1aeebnebb17f7534b8183a@example.com> <11380cb60906100242w7a13b869j5b4d3315a4125f53@example.com> <956ae5a90906100308l215adc81m1dcfbb54dc826472@example.com> <d8fcc0800906100527p59d4d548v42999d96e7ad066c@example.com> <956ae5a90906100547i2e610cct42b8b075c50b6d6@example.com> <d8fcc0800906100614s4c909d0fj8091e3bfe9926c18@example.com> <4A30D148.1090004@example.com> <d8fcc0800906110258y553b9712hcb55c5a3ed4b6d69@example.com>
On Thu, Jun 11, 2009 at 10:58 AM, Josh Glover<jmglov@example.com> wrote: > 2009/6/11 John Fremlin <john@example.com>: > >> Which shell expands "*.leases" in double quotes!? > > Well, from my tests, not Bash. > > Odd, I always thought you had to protect * and ?, but it looks like > I'm mistaken. > > Dunno what is going on with Doug's rsync commands, then. > > -- > Cheers, > Josh Well, as an update, use of single-quotes instead of double-quotes seems to have helped. No over-night sync-errors due to missing .lease files, so I am pretty satisfied with the outcome. Still, I am enjoying this discussion of behavior on the shell with regard to interpolation. I think what happened is that the script (written in summary here) did the following: #!/bin/bash rsync -a --exclude "*.lease" host:/path local_path/ If the script was run by, say, a system-user called 'sysuser' (not the real name), then based on the script above, I think what it did was interpolate "*.lease" to look for any .lease files in sysuser's home dir, or wherever it tried to run the script. And only after that, did it then run the rsync command. Since the document repository was elsewhere on the system, it would naturally find no .lease files and fail to exclude them. By using single-quotes, the shell would defer interpolation of the file-exclusion to the rsync command itself. In other words, defer and let rsync sort things out, which is as it should be. Hopefully I am right. -- Doug McLean Blog: http://nihonshukyo.wordpress.com/
- Follow-Ups:
- Re: [tlug] Rsync exclusion question
- From: Josh Glover
- References:
- [tlug] [TLUG] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Clemens Schwaighofer
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Josh Glover
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Doug McLean
- Re: [tlug] [TLUG] Rsync exclusion question
- From: Josh Glover
- Re: [tlug] Rsync exclusion question
- From: John Fremlin
- Re: [tlug] Rsync exclusion question
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] (OT) The enigma of Japan
- Next by Date: Re: [tlug] (OT) The enigma of Japan
- Previous by thread: Re: [tlug] Rsync exclusion question
- Next by thread: Re: [tlug] Rsync exclusion question
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links