Hard link

From MEPIS Documentation Wiki

Jump to: navigation, search

Hard link is a reference, or pointer, to physical data on a storage volume. On most file systems, all named files are hard links. The name associated with the file is simply a label that refers the operating system to the actual data. As such, more than one name can be associated with the same data. Though called by different names, any changes made will affect the actual data, regardless of how the file is called at a later time. Hard links can only refer to data that exists on the same file system.

Basically, if you create a hard link you create a new name for the file or folder, if you delete the hard link you delete the associated file too.

To create a hard link you can use this command:

ln TARGET LINK_NAME

This creates a link to TARGET with the name LINK_NAME. TARGET can be either a folder or a file. For more information about the command type in terminal:

man ln
Personal tools
In other languages