Escape character for --exclude?
jellis at dhnet.us
Mon Aug 7 17:54:13 GMT 2006
> On 8/6/06, Jeffrey Ellis <jellis at dhnet.us> wrote:
>> > Hi--
>> > Ok. I've now run into the next thing I can't find in man, and this time, I
>> > googled as well:
>> > --exclude /afs/\*
>> > I thought you could just say:
>> > --exclude /afs/* or even --exclude /afs/
>> > To exclude the entire afs directory. Can you explain what the purpose of
>> > the \ and * are here?
>> > Thanks again :)
>> > All My Best,
>> > Jeffrey
> The escape character has nothing to do with rsync, it is supposed to
> keep the shell from globbing. You can usually encapsulate strings
> within quotes to acheive the same effect as using escape characters
> (in borne shell, anyway).
> --exclude /afs/\*
> is the same as
> --exclude "/afs/*"
> For an explanation of the asterisk, please see the INCLUDE/EXCLUDE
> PATTERN RULES section in the rsync man page. It explains them better
> than I ever could in an email and also includes some real world
> examples and their meaning.
> Aaron W Morris (decep) <aaronwmorris at gmail.com>
> Hi, Aaron--
> I think the same use of quotes holds true in bash as well, IIRC. I actually
> had read the INCLUDE/EXCLUDE
> PATTERN RULES section, but I guess I was confused by another usage I had read
> Thanks again :)
> All My Best,
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the rsync