rsync using wildcard (*) character
Meeaz
zaeem.masood at gmail.com
Fri May 30 15:32:18 GMT 2008
Thanks a lot Matt!
All files are transferring now. It however shows an error as follows:-
rsync: failed to set permissions on "/var/log/Wlog/TEST/.": Operation not
permitted (1)
Please advise
Matt McCutchen-7 wrote:
>
> On Thu, 2008-05-29 at 12:07 -0700, Meeaz wrote:
>> If I run the following command using include option, it does not copy the
>> first file from under "/opt/bea/test " directory
>>
>> rsync -arv --include /opt/bea/test/z* ddef at rclok95:/var/log/Wlog/TEST
>>
>> Note that the rest of the files are copied. Where am I going wrong?
>
> Do this:
>
> rsync -arv --include='/z*' --exclude='/*' /opt/bea/test/
> ddef at rclok95:/var/log/Wlog/TEST
>
> Include/exclude rules do not take the place of source arguments
> like /opt/bea/test/ ; rather, they make rsync skip some of the files
> specified by the source arguments. All an "include" rule does is
> override later "exclude" rules. Thus, the literal meaning of the
> command above is to send all of /opt/bea/test/ but skip all top-level
> files that do not begin with "z", which amounts to what you want. See
> the "FILTER RULES" section of the man page for much more information.
>
> Your command sent most of the files because you let the shell expand the
> wildcard; the first file became the include pattern (which had no
> effect) and the rest became source arguments. Prevent the shell from
> doing that by quoting the wildcard.
>
> Matt
>
>
> --
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>
--
View this message in context: http://www.nabble.com/rsync-using-wildcard-%28*%29-character-tp17536197p17561906.html
Sent from the Samba - rsync mailing list archive at Nabble.com.
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the rsync
mailing list