hard link identification
bonomi at mail.r-bonomi.com
Wed May 23 08:26:00 UTC 2012
Devin Teske <devin.teske at fisglobal.com> wrote:
> On May 22, 2012, at 2:26 PM, Robert Bonomi wrote:
> > <dteske at freebsd.org> wrote;
> >> For directories, the link-count is quite obviously the number of filesystem
> >> entities contained within.
> > That is *INCORRECT*.
> 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
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
More information about the freebsd-questions