files owned by root/world writable
William "Badger" Epperly
epperly at cs.odu.edu
Thu Nov 15 16:03:48 AEST 1990
Hey, folks! If this is the wrong place for this article
you have my apologies, but where else would it go?
Listen, I have a problem here. I am trying to write
a small shell script that will search a network, made up of nine
servers, for all files owned by root that have world writeable
permissions. I have tried working with the find command and its
-perm option but it does not seem to take wild cards (although the
man page shows an example using * and ?, but these only appear to
be for filenames), so that is unusable by itself. I have also tried
a combination of find and awk. The trouble here is that the man
page for awk is so poorly written that it is hard to tell exactly
what you can do with the different options and constructs. This is
what I tried
find / -user root -ls | awk {'if substr($1,9,1)=w print>test.out
granted this doesn't work, so no flames about my ignorance please.
Any help would be appreciated though, and you would have my undying
gratitude, which along with $.75 will get you a cup of coffee at
7-11.
anyway, thanks in advance.
Please send replies to
epperly at cd.odu.edu
William Epperly
More information about the Comp.unix.questions
mailing list