User: Password:
|
|
Subscribe / Log in / New account

Space savings should use COW

Space savings should use COW

Posted Sep 10, 2004 0:46 UTC (Fri) by roelofs (guest, #2599)
In reply to: Space savings should use COW by walles
Parent article: More notes on reiser4

So do you (or anybody else for that part) know of any other uses for hard symlinks that don't have anything to do with space savings?

Assuming you really meant "hard links," I use them to avoid accidentally deleting local mail files. Since such files get updated every day, usually several times a day, even daily incremental backups aren't sufficient to recover from an accidental deletion. But with hard-linked copies in a separate directory (e.g., ../.backups/foo.backup, etc.), you're safe. (And when you really do want to nuke the file, just truncate it to zero bytes--I wrote a trivial "trunc" utility that simply uses truncate() or ftruncate() for this purpose.) Of course, I suppose I could simply keep the "real" copy in the same hidden directory and use local symlinks to append to it...but with hard links you save one letter in every ls(1) command (i.e., -L). :-)

I've also occasionally used hard links to save a temporary MPEG or PDF file downloaded by Netscape; under some conditions, the temporary file will disappear as soon as the download is complete, but if you make a hard link at any point prior to that, the link will remain. For multi-megabyte downloads, that can be convenient, albeit not absolutely critical...

Greg


(Log in to post comments)

Space savings should use COW

Posted Sep 11, 2004 15:44 UTC (Sat) by khim (subscriber, #9252) [Link]

And this too can be covered by COW files. The fact is in almost all cases where I think about hardlink I found what I really need is COW file and hardlink is just poor substitute.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds