Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 3 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.