Soft and Hard Links in Linux

Soft and Hard links in Linux are kind of a weird concept in Linux. The primarily detail to keep in mind is that every object stored on a harddrive is given a memory address. You can think of the harddrive as a neighborhood, and each object as a house within that neighborhood. Soft links create physical representations of this address on the system, but they really only keep that address on hand. In many ways they are effectively a Windows Desktop shortcut, but they can exist anywhere on the system or network. In fact, soft links can even exist across a network or in the cloud as long as the source file exists. The video below demonstrates how to create a soft link, but uses a file within the same directory for convenience.

In a lot of ways hard links are very similar to soft links, except they also create a copy of the file to which they’re linked. Ultimately that means that the local version of the file can update the source file, and vice versa. This option can be considered safer than soft links because it is easier to recover any work lost with a deleted file. However, hard links are a little more limited because they cannot exist on different filesystems even if the source file exists. The video below demonstrates how hard links can be created, and how they can be used to maintain data lost.

If you buy anything from Amazon using the link below I may receive a commission from your purchase at Amazon.
Tech Best Sellers at Amazon

Leave a comment

Your email address will not be published. Required fields are marked *