Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2002 11:31:17 -0400 
From:      "Morse, Richard E." <REMORSE@PARTNERS.ORG>
To:        'Ryan Thompson' <ryan@sasknow.com>, Steven Lake <raiden@shell.core.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   RE: Questions about Chmod
Message-ID:  <375F68784081D511908A00508BE3BB1701EF1B2F@phsexch22.mgh.harvard.edu>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?375F68784081D511908A00508BE3BB1701EF1B2F>