/**************************************************************************\ * HighLnk 0.2 http://www.thpinfo.com/highlnk/ * * Copyright (c) 2004 Thomas Perl * \**************************************************************************/ This is the 0.2 release of my small-but-powerful HighLnk linux tool. The idea behind is, that on read-only media (be it a always read-only mounted hard disk partition or better examples like a CD or DVD), it is not possible to change files. If you can't change the files, but you can hard-link them (letting two different filenames point to the same data on the media), you would save bytes if a file with bytes appears two times in the scanned directory tree. If appears three times, my method would save * 2 bytes, and so on.. I've tried this proof-of-concept version of HighLnk on my slackware- current w/ slackware-9.1 tree. By using SOC, I gained 634MB of disk space using this technique, shrinking the whole tree from ~5,8GB to ~5,1GB. Now is that cool or what? :) You can then create a ISO image for burning on CD-ROM by using mkisofs' "-cache-inodes" parameter, which does exactly what I want it to do - preserve the hard links also on CD-ROM and save space this way. I got inspired by some Windows XP installation CD which contained both Home and Pro Edition, resulting in more content than the CD could possibly hold, but the fact that there were same files in both Editions clued me in. Please, please give me feedback on what you think about this idea (also, if you have any improvements): perl.thomas@aon.at -- Thomas Perl, August 18th 2004, 02.21am MD5 code taken from http://www.cr0.net:8040/code/crypto/md5/ Finder inspired by http://groups.google.com/groups?selm=slrnao99jn.be2.h.harders%40pc52.ifw.ing.tu-bs.de