chmod -R is good if you want to change the permissions of files with names that fit a regular expression. For example, if you can list all of the files that you want to change using the ls command using some expression to match the names of the files then you can select those same files using chmod -R. So if you can do:
then you can do
Code:
chmod -R <expression>
You might also want to add the -c option to the chmod command so that it will list all of the files that it changes.
Code:
chmod -cR <expression>
If you need to select the files based on other characteristics then you might want to use the find command to select the files and pipe that list to the chmod command. Here's an example that selects all of the files in the current directory tree that have suid set and removes that characteristic.
Code:
find . -type f -perm +6000 -exec chmod -c a-s {} \;
The find command can be very handy when you want to make changes on groups of files.