From owner-freebsd-questions Tue Jun 4 8:31:32 2002 Delivered-To: freebsd-questions@freebsd.org Received: from PHSEXCHICI2.Partners.org (phsexchici2.partners.org [170.223.254.21]) by hub.freebsd.org (Postfix) with ESMTP id 39B9E37B404 for ; Tue, 4 Jun 2002 08:31:27 -0700 (PDT) Received: by phsexchici2.partners.org with Internet Mail Service (5.5.2650.21) id ; Tue, 4 Jun 2002 11:31:26 -0400 Message-ID: <375F68784081D511908A00508BE3BB1701EF1B2F@phsexch22.mgh.harvard.edu> From: "Morse, Richard E." To: 'Ryan Thompson' , Steven Lake Cc: freebsd-questions@FreeBSD.ORG Subject: RE: Questions about Chmod Date: Tue, 4 Jun 2002 11:31:17 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="ISO-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ryan Thompson [mailto:ryan@sasknow.com] wrote: > find(1) will assist you with this. find(1) allows you to apply > commands to each file it matches. So, something like > > chmod 755 `find . -name "WWW" -print` > > Should do the trick. This will possbily have a problem: find will output a newline separated list. This could confuse the chmod command.... instead: read the find manpage, as well as the xargs manpage. You should be able to type something _like_ (I'm not positive it's exactly this, but it approaches) find . -name "WWW" -exec "chmod 755 {}" -print or: find . -name "WWW" -print | xargs chmod 755 People differ on which version they prefer, and in some situations they like one or the other (I think it depends on if they feel like piping through a tee or not...) HTH, Ricky To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message