mass chmod chown...

Jeff Vian jvian10 at charter.net
Sat Jul 17 13:54:56 UTC 2004


On Sat, 2004-07-17 at 08:28, Alexander Dalloz wrote:
> 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 
> 
And you would do something similar for the files.  Normally you would
want the directories to be executable, but the files to not be
executable so you would do the directories and files differently on the
chmod command.





More information about the users mailing list