![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Script | mojoman | Shell Programming and Scripting | 6 | 05-12-2008 12:55 AM |
| simple script help | ali560045 | Shell Programming and Scripting | 4 | 01-24-2008 02:24 AM |
| simple script | ali560045 | Shell Programming and Scripting | 1 | 01-22-2008 01:41 AM |
| Simple Script Help | Skunkie | UNIX for Dummies Questions & Answers | 4 | 10-02-2006 08:18 AM |
| simple awk script... | moxxx68 | Shell Programming and Scripting | 3 | 01-24-2005 01:17 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
find /home -type f -perm -111 -print
|
|
#3
|
|||
|
|||
|
thanks Perderabo! Thats exactly what I needed
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
Then there's really no point to this since that's where users will store their executables
But pipe the find to something like: | grep -v /.dt/ |
||||
| Google The UNIX and Linux Forums |