What is the purpose of a Hard Links in Real World? Are there any examples of using Hard Links in the real world?
Didn't see much "hard link" usage in real world, the only one i remeber is from a backup utility named "rsnapshot"
The common use case is to have multiple "copies" of the same file referenced in different directories so to avoid wasting space.
If you put the backup of your data in a directory named /BACKUP/yesterday then the day after you can create a directory /BACKUP/today and filling it with hardlinks to inode already referenced in /BACKUP/yesterday. This is a perfect mirror of yesterday's backup using the same inodes so no space wasting. Now if you rsync your current data to /BACKUP/today you will have the new backup version and the old one, using only the space needed from the diff between yesterday and today.
Not sure that i've explained it very well but it's, more or less, how it works
ciao!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.