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

Re: breadth first globbing



On Tue, 31 Mar 2015 12:04:37 +0200, Mikael Magnusson wrote:
> On Tue, Mar 31, 2015 at 11:44 AM, Helmut Jarausch
> <jarausch@xxxxxxxxxxxxxxxxxxx> wrote:
> > Hi,
> >
> > I have (unpacked) a directory tree where directories don't have the executable bit.
> > So, I want to iterate over all directories and set the executable bit.
> >
> > Standard globbing like  **/*(/) doesn't work because zsh tries to cd to the directories
> > before I can chmod +x these.
> >
> > Is there a solution with zsh or is it easier to write a Python script for that.
> >
> > Many thanks for a hint,
> > Helmut
> 
> I would probably just chmod -R +x followed by chmod -x **/*(.), that's
> assuming you don't have a mix of +x and -x files already though.

Even simpler should be chmod -R +X (with a capital 'X')

-- 
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.



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