Files in Unix file systems have a link count which indicates how many
names point to the same inode. Directories in Unix filssytems have a
.. entry which functions as a hard link to the parent directory
and a . entry which functions as a link to the directory itself.
The .. entry of the root directory also points to the root.
This means that
find can deduce the number of subdirectories a
directory has, simply by subtracting 2 from the directory's link
count. This allows find the calls to
stat which would
otherwise be needed to discover which directory entries are
File systems which don't have these semantics should simply return a
value less than 2 in the
st_nlinks member of
in response to a successful call to
If you are building
find for a system on which the value of
st_nlinks is unreliable, you can specify
configure to prevent this
assumption being made.