Image from Stackoverflow

Hard Links and Symbolic Links

The difference between hard links and symbolic also known as soft links is fairly simple.

A soft link or symbolic link is exactly like a shortcut folder on you computer. It points to an original file within the system that contains the same information. A name change will not affect a symbolic or soft link. However, if the original file is deleted, the symbolic link will then become unusable. The inode number of the soft link is also smaller than the original.

A hard link is more like a copy of an original file. The name of it can be changed just like a symbolic file and it will not affect the contents of the file. A hard link will contain the same file size as the original file and if the original file is deleted nothing happens to the hard link. The inode number of the hard link will remain the same no matter how many copies are made. The inode is what contains the information about the files.

Now you’re probably wondering how to create hard and soft links. It is very simple. A hard link can be created using the command “ln” which makes links between files.

Command to Create a Hard Link

A soft link can be created using the command ln -s

Command to Create a Soft link or Symbolic link

It really is that easy.

Sources

Refs:

http://stackoverflow.com/questions/185899/what-is-the-difference-between-a-symbolic-link-and-a-hard-link

https://www.youtube.com/watch?v=4-vye3QFTFo