On Mar 31, 2015 3:05 AM, "Mikael Magnusson" wrote: > > On Tue, Mar 31, 2015 at 11:44 AM, Helmut Jarausch > wrote: > > > > I have (unpacked) a directory tree where directories don't have the executable bit. > > > > Standard globbing like **/*(/) doesn't work because zsh tries to cd to the directories > > before I can chmod +x these. > > > > I would probably just chmod -R +x followed by chmod -x **/*(.) Breadth-first globbing is **/*(/Od) but in this case the problem is that globbing itself can't match anything until the directory modes have changed, I think? So I'd just do something like while chmod +x **/*(/^x); do :; done Assuming you have nomatch set so the loop will fail when all directories have the x mode.