bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #14619] find -perm +... broken in 4.2.25


From: Eric Blake
Subject: [bug #14619] find -perm +... broken in 4.2.25
Date: Thu, 6 Oct 2005 09:49:07 -0600
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)

Follow-up Comment #4, bug #14619 (project findutils):

I don't think the original poster has discovered any bugs, rather just their
misunderstanding of the (admittedly confusing) POSIX requirements.  I have,
however, found a bug in 4.2.25:

$ touch 000 100 111 777
$ for f in * ; do touch $f $f ; done
$ find . -perm --x
.
./000
./100
./111
./777
$ find . -perm +-x
./000
$ find . -perm /-x
$

The first two are correct.  --x means use mode "-x", which maps to the
template 0000, and find all files that have all set bits in the template set
on the file (no bits meet this criteria), without regard to the state of any
bit cleared in the template (ie, every file should match).  +-x means use
mode "+-x", which maps to the template 0000, and do an exact match (only
./000 has all permissions cleared).

However, /-x means use mode "-x", and find all files that have any set bit in
the template set on the file (no bits meet this criteria), without regard to
the state of any bit cleared in the template (ie, every file should match). 
So the bug is that /-x should behave like --x, but did not.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=14619>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]