[CentOS] evaluating backup systems: rsync

Sun Jan 13 08:47:41 UTC 2013
Gordon Messmer <yinyang at eburg.com>

On 01/11/2013 02:05 PM, m.roth at 5-cent.us wrote:
> A hard link isn't easy: it's an inode that is referenced by more than one
> other inode.

Don't make it complicated.  All regular files are hard links to an 
inode.  The inode contains information about the owner, group, 
permissions, and modification times (among other things) and a 
description of the blocks holding the associated data.  If you create a 
new file, the filesystem allocates a new inode and creates one hard link 
to it.

In the output of 'ls -l', you'll see a number just after the file 
permissions.  That is the number of hard links to the referenced file. 
As others have stated, when you "rm" (which calls unlink() in libc), the 
kernel removes the link and decrements the link count. If the count is 0 
and the file is not open, the filesystem will release the data blocks, 
and 'df' will report the change in disk space used.