[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chmod



Hi,

* Daniel D Jones <ddjones@riddlemaster.org> [02-05-01 00:04]:
>So, the primary question is, is there an easy way to set the permission on
>directories, only directories, and all sub-directories?  A related question
>is how to use ls to list only directories.
You should try to find(1) the directories. Something like
    find startDir -type d -exec chmod $perm {} \;
might work (untested), but you should really check find(1)'s manpage
to learn more about it.

>And if anyone's in a 'splaining mood, here's another one: how do you set all
>files so that the group permissions match the user permissions?  (If you have
>three files who's permissions are, for example, 700, 600, 500, and you want
>them to be 770, 660, 550 respectively.)
First thought: Parse the output of ls, feed it into chmod.
Perl might be useful here.

Thorsten
-- 
Miss Wormwood: Calvin where was the Byzantine empire?  
Calvin: I'll take "outer planets" for $100.


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: