What is an inode

In Unix like system, the central element of a file system entry is an inode (index node):

\includegraphics[scale=0.8]{inode}

This inode contains several meta information and the location of that file on the disk (that part of the picture does absolutely not reflect the real situation).

In the figure above, you see three hard links (``file names'') for this inode, so the number of hard links to this inode would be 3. We can see this with ls -li:

$ ls -li /tmp/a /home/bob/xfile /var/tmp/file
114693 -rw-r-r- 3 hjc hjc 5 Sep 6 13:55 /tmp/a
114693 -rw-r-r- 3 hjc hjc 5 Sep 6 13:55 /home/bob/xfile
114693 -rw-r-r- 3 hjc hjc 5 Sep 6 13:55 /var/tmp/file

The first digits form the inode number.

Naturally, all hard links to an inode must be in the same file systems. If the different directories in the example above are not in the same file system on your computer, you cannot configure exactly that example. To create a hard link on the shell you have to use the command ln.

All these entries for that inode have the same permissions, gid and uid. See Limitations to understand what this means for storeBackup.

Btw., you cannot set a hard link to a directory because this could result in infinite loops. Nevertheless, directory entries also use the feature of having multiple names for one inode: Take a look at the directory ``name'', ``.'' and ``..'' (the last perhaps multiple times)!

Heinz-Josef Claes 2014-04-20