In find -perm, what’s the difference between “+6000” and “/6000”

command linefindpermissions

I'm trying to find all the setuid/setgid binaries on my system. I've found two different ways to do this online.

What's the difference between

find / -perm +6000 -type f

and

find / -perm /6000 -type f

?

The latter is mentioned more often, and their results are the same. I want to make absolutely sure I don't miss any files. Are they the same?

I'm running this on an Ubuntu trusty box, but that could change in the future.

Best Answer

The find manual page explains:

   -perm +mode
          Deprecated,  old way of searching for files with any of the per‐
          mission bits in mode set.  You should use -perm  /mode  instead.
          Trying to use the `+' syntax with symbolic modes will yield sur‐
          prising results. […]

So yes, they're the same thing, but you should use -perm /mode.

Related Question