Devin Teske <devin.te...@fisglobal.com> wrote:
>
> On May 22, 2012, at 2:26 PM, Robert Bonomi wrote:
>
> > <dte...@freebsd.org> wrote;
> >> 
> >> For directories, the link-count is quite obviously the number of filesystem
> >> entities contained within.
> > 
> > That is *INCORRECT*.
>
> Details.
>
> The OP wanted to know about files. I chose to not elaborate on the 
> directory-case of the value (as it was not important to the OP).

FACT: The count for a directory is _NOT_ the number of "filesystem entities"
containted within, as you claimed.   (Unless your notion of a 'filesystem
entry' excludes (1) regular files, (2), named pipess, (3) device nodes,
(4) unix sockets, (5) symlinks, AND everything else, _except_directories_,
that appear as entries in a directory.)

Tell me, according to your claim that "for directories, the link-count is 
quite obviously the number of filesystem entities contained within", just
_approximately_, what is the expected link count for a directory containing
135 regular files, 9 'dot files' (including '.' and '..'), and 26 sub-
directories?  No need for an exact answer.  Just pick one -- do you claim 
the number is going to be close to 26, or to 170?

The 'details' of the link count for a directory became significant only
when someone posted grossly incorrect information about what that number
"meant".

A 'name' inside a directory points to an 'inode'.  the inode has a count
of how many 'names' point to that inode.  It doesn't make NOT ONE D*MN BIT
of difference whether the contents of that inode are a directory, a regular
file, a symlink, or whateverC -- the 'link count' has always exactly the
same meaning.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to