Newsgroups: comp.unix.shell
> changed on a Solaris 7 box. All executables need one set ie 775, > directories another (possibly the same), and regular data files another > ie 644.
Directories are easy enough.
find /dir -type d -exec chmod 755 {} \;For files, you could do something like
for file in `find /dir -type f`
do
if file $file | grep "script" >/dev/null 2>&1
then
chmod 775 $file
else
chmod 644 $file
fi
doneThis is dependant on what you include in your definition of scripts. If you have perl or other such scripts, you might want to expand the grep, eg:
file $file | egrep "script|perl|python"
"Peter Sundstrom"