Re: evaluating backup systems: rsync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 01/11/2013 02:05 PM, m.roth@xxxxxxxxx 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.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux