Puzzel Soalris command structure
Posted on 2011-10-26
I have a problem, a real puzzle!!
This has to do with the FIND command specifically on SOLARIS. Normally I could use alternatives
Like the GNU find or find2perl but in this case I have specific constraint I have to stay with the native
SUN find command
Here is the problem: this is a basic find command to look for world writable file and excluding some dir
From the search path. The problem with this is that if someone creates a file or dir like /opt/dev it will also be exclude
And we don’t want that. To add to the problem this will be run on over 1000 servers within another app
So anyone has idea on how I could build this command.
find / -name /proc -prune \
-o -name /sys -prune \
-o -name /dev -prune \
-o -name /devices -prune \
-o -perm -2 ! -type l ! -type s \
! \( -type d -perm -1000 \) -ls