KoblentsBlog Photography
Contact About
Ches
Softlink vs Hardlink
A hard link is a link to an inode. If you have a file on your filesystem, the traditional pointer to it is a hardlink. If you create more hardlinks, then deleting, moving, or renaming the original hardlink has no effect on other hardlinks - they still all point to the same area. Modifying the file changes the data at that inode, so all hardlinks will have modified data. Deleting one hardlink does nothing to the data, until all links are deleted, at which point the area is freed.
Because hardlinks point to an inode, they can only be made for the same filesystem.
A symbolic link, or a soft link, simply points to a path - absolute or relative. They can span filesystems, naturally. A softlink has to be dereferenced to find out the underlying inode storing the data. Because of this, softlinks can be "broken" - referencing files that don't exist.
More stuff in the list of things I should have known, but never really needed to.
Ches Koblents
June 26, 2014
 
« Newer Older »
© Copyright Koblents.com, 2012-2024