Links in Linux are like shortcuts created in windows (.lnk files). In Linux there are two types of links that can be created, they are hard and soft links.
Before getting closer to links, a understanding of how files are stored in Linux is good,
inode – All files and directories in Linux are stores with a unique number called inode, this inode is also a data structure that holds the attributes of the file/directory
Hard Link
The created link takes the inode of the original file
Advantages
- Any change (attribute) done to the original copy will reflect in the link.
- Link will still point to the file, if the source file is deleted.
Limitations
- Cannot go beyond file systems boundaries.
- Cannot link directories (This limitation is to prevent endless recursive loop)
