Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Pruning Recursive Glob



Chris Johnson wrote:
> Hi.  I'm having trouble finding a recursive glob pattern that can help
> me change permissions on all files except CVS directories.  I'd like to
> have a checkout of a CVS repository in my web directory, but not make
> the CVS information readable when I make everything else accessible.
> 
> For example, I'd like to issue something like
> 
>    $ cd WWW/checkout
>    $ chmod a+rX **/*~CVS
> 
> to make all non-CVS files readable and all non-CVS directories readable
> and executable.  But that ~CVS doesn't do any pruning.  Nor does ~*/CVS,
> ~**/CVS, etc.
> 
> Is what I'm trying to do supported by some globbing pattern?

(^CVS/)#^CVS

This requires EXTENDED_GLOB, unlike the basic "**" syntax.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author