From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22157 invoked by alias); 31 Mar 2015 10:04:50 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20054 Received: (qmail 3640 invoked from network); 31 Mar 2015 10:04:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Np+eNugs2vs/8BJkflyWUwqDSIMg/Iw9MzFpby+Nt04=; b=EnW9PdxFPfCjISw8IvNPJnRHtCQ75bxD0z80LvO/e/yOfr/2PwAJ1/zAkif3o9SiTT UkGXwLXuOCEanGzfRcFq8KuFwegDSLgDaiqEqR51c+T/zN9YdSilsW3cqxlT79JkeMtZ PTHzrZ1n+x+hsyGWQYlSkUzUShjno76HiMokssdQiIO8DXUp7iVThg31KsBy11PSeT5z ZridzPQCRwcjPCOP2t2MOwZImDOqrJ6Wg/8HqRAnernezY29079YPr7QJ0PAPGgf/lJ3 TsKIwhDLUq0MplHL0yS4B0htSIsxOKMEDmnFXda/qFb7hWpeWYQpwb1T9X7f2sTVhPYf fuZA== MIME-Version: 1.0 X-Received: by 10.107.16.87 with SMTP id y84mr20988164ioi.53.1427796277100; Tue, 31 Mar 2015 03:04:37 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Mar 2015 12:04:37 +0200 Message-ID: Subject: Re: breadth first globbing From: Mikael Magnusson To: jarausch@igpm.rwth-aachen.de Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Tue, Mar 31, 2015 at 11:44 AM, Helmut Jarausch 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. -- Mikael Magnusson