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

Re: Pruning Recursive Glob



2009/1/26 Chris Johnson <cjohnson@xxxxxxxxxxxx>:
> 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 should work, do you have setopt extendedglob in effect?

-- 
Mikael Magnusson



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