Skip to main content
2 of 4
added 258 characters in body
netmonk
  • 1.9k
  • 1
  • 15
  • 20

in the manual you can find :

Operators Operators join together the other items within the expression. They include for example -o (meaning logical OR) and -a (meaning logical AND). Where an operator is missing, -a is assumed.

So litterally \( -perm -0002 -a ! -perm -1000 \) means : perm = 0002 and not perm = 1000

perm = 0002 means writeable for Others perm = 1000 means sticky bit is set.

So this expression search for file writable for Other and without sticky bit sets.

Looking for directory is done with -type d d means directory so find look after object of type directory

from the find manual, -perm has several forms : -perms 0002 will match all files with this exact permission setting -perms -0002 will match all files where this right bit is setup, (which means 0772,1752...whatever combination if the file is writeble for others)

netmonk
  • 1.9k
  • 1
  • 15
  • 20