Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I list all files without 777 or 775 file permissions?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted
find <some dirs> \! \( -perm 0777 -o -perm 0775 \)
share|improve this answer
    
Is this listing all files without these permissions, or all files with these permissions... it seems like it's with these permissions... –  Webnet Oct 7 '10 at 1:20
    
The ! reverses the following predicate. –  Ignacio Vazquez-Abrams Oct 7 '10 at 1:22
    
Wouldn't this specification not take into account SGID, SUID, and items marked with the sticky bit? –  mdpc Oct 7 '10 at 18:19
    
@mdpc: Sure, but those aren't really "775" or "777" either. –  Ignacio Vazquez-Abrams Oct 8 '10 at 2:45
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.