mass chmod chown...

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Sat Jul 17 13:28:43 UTC 2004


Am Sa, den 17.07.2004 schrieb Jonathan T. Steadman um 14:56:

> Is there a way in linux (FC1 if this matters) that I can mass
> chmod/chown files?  its kind of sluggish doing a directory at a time, i
> want to be able to like chmod all the files and folders say in a certain
> directory then start climbing directory tree and chmod every folder
> inside the main directory.  Sorry if this is a newb question, but what
> can i say...i am one ;).

Besides what Aaron already answered about using the "-R" parameter, you
can use the command "find" to do specific things. An example would be:

find /path/to/change/things/inside/ -type d -print0 | xargs -0 chmod 755

The command above sets for all direcories inside the given directory
(recursively of course) to "chmmod 755". See the man pages of the used
tools and maybe use it analogue for i.e. setting permissions for files
or by using the additional parameter "-name" setting ownership only for
files/dirs with specific names.

Alexander 


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 2 (Tettnang) Athlon CPU kernel 2.6.6-1.435.2.3.uml
Serendipity 15:20:19 up 4 days, 13:02, load average: 0.05, 0.05, 0.01 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20040717/9751d12d/attachment-0002.bin 


More information about the users mailing list