hard links why to use
Hi
I wonder what is the purpose of using hard links instead of being a shortcut to some file ? thx for help. |
A hard link is second filename referencing the same inode (file).
A symbolic link is a shortcut or redirect from one inode to the original. For this reason hard links MUST be in the same filesystem, soft/sym links can be in different filesystems. Read more details below, it is a lot to type. http://www.linuxclues.com/articles/17.htm http://linuxgazette.net/105/pitcher.html |
I understand the differences but what I don't understand is when each link is used ?
In which circumstances sys admins use symbolic links and in which hard links ? thx for help. |
Quote:
1) Hardlinks are faster (small bit) 2) One hardlink can be deleted but the data still exists. If you delete the data from a sym link you have garbage in the link. I dont know of any other reasons, like I said I almost always use sym links. But I could see why some people say ALWAYS use hard links if your in the same filesystem. I guess its another one of my bad habits. |
Quote:
Hardlinks are,.. sort of inheriting. As in: If you have a file and you hardlink to it, then delete the file, the hardlink will now be the file. Symlinks are the opposite of that. If you delete the original file that the symlink points to, you have a meaningless symlink. As far as when to use hardlinks? If you are using links accross disks/filesystems, then you have to use a Symlink. There are certain situations where you can use hardlinks as a backup: like this http://slaptijack.com/system-adminis...th-hard-links/ Hope this helps. |
Two uses of hard links:
|
All times are GMT -5. The time now is 07:57 AM. |