Dave G writes:

  >  find / \( -perm +4000 -o -perm +2000 \) -print 
  >  and
  >  find / \( -perm -4000 -o -perm -2000 \) -print
  >  
  >  The GNU find man page states:
  >  
  >         -perm -mode
  >                All  of  the  permission  bits mode are set for the
  >                file.
  >   
  >         -perm +mode
  >                Any of the permission bits mode  are  set  for  the
  >                file.
  >   

"All bits" and "any bits" are the same when only testing one bit.

[ant@notatla trial]$ find . -perm -0404 -ls
113159    1 drwxr-xr-x   2 ant      ant          1024 Mar 31 22:52 .
  4193    0 -rw-r--r--   1 ant      ant             0 Mar 31 22:51 ./moe
[ant@notatla trial]$ find . -perm +0404 -ls
113159    1 drwxr-xr-x   2 ant      ant          1024 Mar 31 22:52 .
  4193    0 -rw-r--r--   1 ant      ant             0 Mar 31 22:51 ./moe
  4191    0 -r--------   1 ant      ant             0 Mar 31 22:50 ./curly
  4192    0 -------r--   1 ant      ant             0 Mar 31 22:50 ./larry


--
##############################################################
# Antonomasia   [EMAIL PROTECTED]                      #
# See http://www.notatla.demon.co.uk/                        #
##############################################################


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to