[wellylug] permissions munted

Andrew Ruthven andrew at etc.gen.nz
Fri Jul 31 13:56:56 NZST 2009


On Fri, 2009-07-31 at 12:58 +1200, David Antliff wrote:
> On Fri, Jul 31, 2009 at 08:47, Cliff Pratt<enkidu at cliffp.com> wrote:
> > find /path/to/base -type d -exec chmod 755 '{}' \;
> 
> Much to my surprise, I discovered a few weeks ago that -exec is
> deprecated. Apparently one should use -execdir instead (see manpage
> for details).
> 
> I can't remember exactly what I was doing at the time, but I found
> this out when -exec started behaving in a non-familiar way. I do
> recall I was quite puzzled.

Another approach is to use xargs.

find /path/to/base -type d | xargs chmod 755
find /path/to/base -type f | xargs chmod 644

Cheers!

-- 
Andrew Ruthven, Wellington, New Zealand
At home: andrew at etc.gen.nz |          linux.conf.au 2010 
                           | Follow the signs. Visit Wellington!
                           |      http://www.lca2010.org.nz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.wellylug.org.nz/pipermail/wellylug/attachments/20090731/e840b1fb/attachment.pgp 


More information about the wellylug mailing list