How can i chmod all the contents of a directory

Associate
Joined
28 Oct 2002
Posts
1,510
I have looked on various websites for this but couldn't see anything specific (or that i understood)

If i have a dir called /home/diss/test and want to chmod to 775 all the files in the /test dir how do i do this?

I tried this:
chmod -v 775 test
but it only changed the permissions of the actual folder


thanks

Diss
 
thanks guys
much appreciated

i remember now seeing something about -R but referring to recursivley or something - didn't know what that meant :(


Diss
 
Recursion is when you define something in terms of its self.

I.e an example to sum everything in a list.
sumL :: [Int] -> Int
sumL (x:xs) = x + sumL xs

So in this case it means traverse down the directory tree and apply the same function to each directory. Pretty useful thing to know.
 
Last edited:
riddlermarc said:
Be aware that using the -R switch will also apply the chmod command to everything in all subdirectories beneath /home/diss/test too :)

ahhhh i wondered about that - thanks

Diss
 
Back
Top Bottom