Hard Link
PronunciationHARD link
Definition
A hard link is an additional name for the same file data on disk. All the names are equal, and the data is only freed when the last one is deleted.
Where you hear it
In Linux administration (ln file link), backup tools that save space and OS filesystem courses.
Examples
Both names point to the same inode; deleting one keeps the data.
ls -lshows the link count.Both names of the file are hard links, so deleting one name keeps the data.
Common mistake
Thinking it is a copy. Edit one name and you edit them all, because there is only one file.
Don't confuse with
A symbolic link, which is a small file that just stores the path to another file and breaks if the target moves.
Say it at work
- In a meeting or chat
Use a hard link to avoid duplicating the file.
- In an email or ticket
The link count is 2.
Keep exploring
More in DevOps & Cloud