MacPorts duplicate files or hardlinks?

Rainer Müller raimue at macports.org
Sun May 24 18:59:27 PDT 2009


Scott Haneda wrote:
> On May 24, 2009, at 12:03 PM, Bee wrote:
> 
>> Are these really a duplicate files or a hardlink?
>> I think the "2" before the "root" means it has a hardlink. Is that
>> correct?
> 
> 
> No, I do not think that is correct:
>     Directories - The amount of links or directories within the directory.
>     The default amount of directories is going to always be 2 because of
>     the . and .. directories.

For files, the "2" is the number of links pointing to the same file. It
has a different meaning for directories, where it shows the number of
direct children in the filesystem. For directories, it will always be at
least 2 because of "." and "..".

So in this case, it is a file with 2 links. One is in the image in
/opt/local/var/macports/software/vim/7.2.182_0/opt/local/bin/vim, one is
activated in /opt/local/bin/vim. They both refer to the same file.

Rainer


More information about the macports-users mailing list