find(1) manual deficiency

Hugh Redelmeier hugh at hcrvx1.UUCP
Sat Aug 24 03:01:05 AEST 1985


The find manual in "UNIX(TM) System V -- Release 2.0 User Reference Manual"
has dropped a detail about the -perm operator.  As a result, the manual
is wrong.  Furthermore, an important facility has been lost.  (The
command itself has not lost the facility, but if it is not documented
it should be considered gone.)  The missing fragment is:
	... and the flags are compared:
		(flags&onum)==onum

In context, this explains how matching is done when onum of "-perm onum"
begins with a minus sign. Earlier, matching was described as comparison
for equality, hence without this fragment, the manual is wrong. Granted
that this expression is only understandable to a C programmer, but that
is better than keeping it secret!

The manual says to see stat(2) to learn the meanings of the permission
bits in octal.  In fact, this is never explained in stat(2), nor is it
easy to see from stat(2) where it is explained.  The correct section is
mknod(2).  Neither stat(2) nor mknod(2) are in the manual that has
find(1), so this cross-referencing is inconvenient.

Hugh Redelmeier (416) 922-1937
{utzoo, ihnp4, decvax}!hcr!hugh



More information about the Net.bugs.usg mailing list