[plug] changing permissions through multiple directories

Leon Blackwell leon at lostrealm.com
Tue May 21 17:33:42 WST 2002


On Tue, May 21, 2002 at 04:51:21PM +0800, Leon Brooks wrote:
> To make all directories readable and listable, but all normal files 
> non-executable:
> 
>     find . -type f -exec chmod a-x {} \;
>     find . -type d -exec chmod a+rx {} \;

For the pedantic (that's me), it should be noted that this assumes that
files are already readable, and that all directories involved already
have read and execute permissions for the current user (otherwise find
won't find anything).

And don't forget X: the bestest addition to chmod since... well... -R

If your files already have permissions set, the following:

chmod go+rX

will add read permissions to all files, and execute permissions to those
that already have execute permissions for some user.  Veeery useful.


-- 
 Leon Blackwell                | For every complex problem, there is a
 http://www.lostrealm.com/     | solution that is simple, neat, and
 jabber:Lionfire at lostrealm.com | wrong.
                               | -- Henry Louis Mencken



More information about the plug mailing list