Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to get the -perm option of find to give me all PHP files that are group writable. Should this work?

find -name "*.php" -perm g-w

Thanks!

share|improve this question
up vote 4 down vote accepted

Try:

find -iname "*.php" -perm -g=w

-g=w means look for files that have this permission set.

share|improve this answer
1  
May want -iname just in case some are .PHP for some bizzare reason. – Daenyth Jun 23 '10 at 19:01
    
@daenyth - Good point! Added it to my answer! +1 – BloodPhilia Jun 23 '10 at 19:06
    
Thanks a ton man! – Kristopher Ives Jun 23 '10 at 21:21
    
@kristopher - You're very welcome! – BloodPhilia Jun 23 '10 at 21:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .