[ale] link

Michael B. Trausch fd0man at gmail.com
Wed Apr 11 14:02:23 EDT 2007


On Wed, 2007-04-11 at 13:06 -0400, Bj?rn Gustafsson wrote:

> Hard linking is decidedly quicker than a copy, because you are only
> creating a directory entry, not actually copying any data.  (It does
> increment the link count in the inode, but that's pretty cheap.)  A
> copy involves opening the original file, allocating a new inode,
> setting properties in that, allocating disk blocks for the data,
> copying data from the original file, and *then* creating a directory
> entry. 


A question that comes to mind:  Is it possible using C or Python or
something to get the inode of a file, find all links to that inode, and
remove them all individually, so as to delete a hardlinked file without
leaving anything behind?  I know that given a directory entry, you can
stat it and find the file metadata, including the inode, but can you do
the reverse somehow?

    -- Mike

--
Michael B. Trausch
                    fd0man at gmail.com
Phone: (404) 592-5746
                          Jabber IM:
                    fd0man at gmail.com
              fd0man at livejournal.com
Demand Freedom!  Use open and free protocols, standards, and software!
-------------- next part --------------
An HTML attachment was scrubbed...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part




More information about the Ale mailing list