I find myself wondering why would one use a soft-link instead of a hard-link in the Linux/ UFS - could it be that soft-links conserve the resources necessary to create an extra inode and thus are a relic of the very early Unix days?
I know a soft-link points to the inode created for that file when the file was created, that a soft-link 'breaks' if the one erases the filename/inode, that a hard-link uses a new/different filename/inode pair for that file data, and that erasing one filename/inode pair of a file that has a hard-link leaves the other filename/inode (and thus its data) intact and accessible but I don't have much of a feel for why one would use a hard-link over a soft-link (or visa-versa).
Any thoughts would be appreciated.
TIA
Links in Linux
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Links in Linux
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Links in Linux
Google is not your friend I take it Search for "soft links vs hard links" turns up many useful articles. This is a good one: http://www.cyberciti.biz/tips/understan ... links.html
Re: Links in Linux
... occasionally, I find duckduckgo.com the better tool (snip)xenopeek wrote:Google is not your friend I take it Search for "soft links vs hard links" turns up many useful articles. This is a good one: http://www.cyberciti.biz/tips/understan ... links.html
Here's an example of the differences that can exist in responses between Google and Duckduckgo:
Search for "Trash/*/**" linux mint on Google then search on Duckduckgo using the same argument.
Regards,
Oops... I clicked on "Edit" instead of "Quote"
Last edited by AlanWalker on Sat May 17, 2014 8:36 pm, edited 4 times in total.
Re: Links in Linux
Each directory on a normal Linux filesystem has at least 2 hard links: its name and its `.' entry. Additionally, its subdirectories (if any) each have a `..' entry hard linked to that directory. It wouldn't make much sense to do that with symbolic links. There are probably more hard links at system level, but yes us users generally create symbolic links as we want a shortcut to a file or folder.
Re: Links in Linux
Ah ha! Now I have more detail of what I know I don't understand! Good.xenopeek wrote:Each directory on a normal Linux filesystem has at least 2 hard links: its name and its `.' entry. Additionally, its subdirectories (if any) each have a `..' entry hard linked to that directory. It wouldn't make much sense to do that with symbolic links. There are probably more hard links at system level, but yes us users generally create symbolic links as we want a shortcut to a file or folder.
Naturally the question of "Why wouldn't it make much sense to use soft-links to link to '.' and '..' wants to be asked, but I'm not going to ask it (just yet?); I'll see if I can find out through a better understanding of the file system.
Thanks, and
Regards,
Re: Links in Linux
Occasionally, I find duckduckgo.com the better tool.
Here's an example of the differences that can exist in responses between Google and Duckduckgo:
Search for "Trash/*/**" linux mint on Google then search on Duckduckgo using the same argument.
It seems that Google is loosing the ability to focus.
Regards,
Note: reposted.
Here's an example of the differences that can exist in responses between Google and Duckduckgo:
Search for "Trash/*/**" linux mint on Google then search on Duckduckgo using the same argument.
It seems that Google is loosing the ability to focus.
Regards,
Note: reposted.