epperly@cs.odu.edu (William "Badger" Epperly) (11/15/90)
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@cd.odu.edu William Epperly
valdis@wizards.vt.edu (Valdis Kletnieks) (11/16/90)
In article <1990Nov15.050348.19997@cs.odu.edu>, epperly@cs.odu.edu (William "Badger" Epperly) writes: |> find / -user root -ls | awk {'if substr($1,9,1)=w print>test.out If your 'find' supports it, try this: find / -user root -perm -002 -ls > test.out To find set-UID files, use '-perm -4000', etc... Valdis Kletnieks Computer Systems Engineer Virginia Tech