"Deependra B. Tandukar" <[EMAIL PROTECTED]> said:

> I have a folder with many subfolders and files. I want to give all the files
> chmod 755 and all the folders 777. Can any one help?

First you might want to make sure you *really* want to set world writable perms. 

There might be a better way to do this, but you could try using the find command, 
redirecting the
output into xargs chmod eg

find /home/httpd/html -depth -type d | xargs chmod 777

If you have any directories or files with spaces in the names, you'll want to throw 
the results of
find thru a sed filter that would wrap each filename in doublequotes:

find /home/httpd/html -depth -type d | sed 's/^.*$/"&"/' | xargs chmod 777

In order to change the perms on the files to 755 just modify the file type in find to 
f and change
your perms, of course:

find /home/httpd/html -depth -type f | sed 's/^.*$/"&"/' | xargs chmod 755

hth

-- 
Tony Inskeep
Pfeiffer University
704.463.1360 x2172
------------------
 
  If on one's way one does not come across one's better or an equal, then
  one should press on resolutely alone. There is no companionship with a
  fool. 61




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to