[TriLUG] fslint

Kevin Hunter hunteke at earlham.edu
Wed Jan 9 16:08:48 EST 2008


At 3:41p -0500 on 09 Jan 2008, Mike Seda wrote:
> the aforementioned command says "any found duplicates will be merged 
> (using hardlinks)". there is no option for using symlinks. my question 
> is why use hardlinks versus symlinks?

I can't give a definitive answer to why the program chose this option, 
but I will say the difference between hardlinks and softlinks is like dd 
and cp: one is below the filesystem level and one is at the filesystem 
level.  Hardlinks are "hard"wired directly to the inode on disk. 
Because of this, hardlinks are not able to span filesystems.

If you create a hard link to an inode (ln filename1 filename2), type 'ls 
-l' and look at the second column: it's inode pointer counter will 
increment by one.  Check the respective man pages of ls and ln for more 
info.

For reference, symlinks (symbolic link) follow the user-level directory 
structure, only at the end pointing to a hardlink (and thus finally to 
to the inode).  So, symlinks will be (very slightly) slower, but they 
allow you to span filesystems.

Kevin



More information about the TriLUG mailing list