Bash Script

Frank Cox theatre at sasktel.net
Tue Jul 10 23:41:24 UTC 2007


On Tue, 10 Jul 2007 18:35:12 -0500
John Pierce <john.j35 at gmail.com> wrote:

> Does anyone know of a bash script that will recurse through a series
> of directories and strip the executable bit from the files in those
> directories and not the directories.

I think this will do what you want, or something close to it.

You may have to play with the chmod permission numbers a bit depending on
exactly what you need to get out of it.

for i in `find $1`
do
   if [ -d $i ] ; then
      chmod 755 $i
      echo $i
   else
      chmod 644 $i
      echo $i
   fi
done



-- 
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com




More information about the fedora-list mailing list