This is a more general question about 'chmoding' recursively.
I have this script which at some point needs to change the permissions recursively in a folder which has a few hundred thousand files. There are new files added in that folder every day, but the ones that are already there have the permissions already set and they don't change.
My question is... when I call
chmod 775 . -R
does it try to set the permission for the files that already have the right permissions set, or only for the new files that don't have the right permissions?
It seems to always take ages to get past this command in the script, even though the 'new' files are only a few thousand and it should do their permissions fairly quickly.
I've looked at the man page for chmod, but it doesn't seem to mention anything on this case.
If chmod doesn't check for permissions beforehand, should I start looking at combining 'find' with 'chmod'?
Thanks Titi