simple script

guys,

I have a need for a simple script that scans all of our users home directories (/home/*) and looks to see if the executable bit is on. If it finds that a user has a file with an executable bit on, it will send an email to managment. (no users are supposed to have any programs of their own on the production server).

My question is getting started on this. Do I need a 'for' loop to read thru each directory?

find /home -type f -perm -111 -print

thanks Perderabo! Thats exactly what I needed

one last thing... what if I wanted to ignore a standard subdirectory under each home directory? For example:

/home/user1/.dt

I want to ignore all of the .dt directories

Then there's really no point to this since that's where users will store their executables :wink:

But pipe the find to something like:
| grep -v /.dt/