cancel
Showing results for 
Search instead for 
Did you mean: 
richielky
Mission Specialist
Mission Specialist
  • 1,544 Views

What is the purpose of a Hard Links in Real World?

What is the purpose of a Hard Links in Real World?  Are there any examples of using Hard Links in the real world?

Labels (1)
0 Kudos
1 Reply
matteoclc
Flight Engineer
Flight Engineer
  • 1,516 Views

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!

--
Matteo Calcagnini
0 Kudos
Join the discussion
You must log in to join this conversation.