Re: Bash Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Jul 2007 18:35:12 -0500
John Pierce <john.j35@xxxxxxxxx> 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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux