Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!evax!utacfd!merch!sneaky!gordon From: gordon@sneaky.UUCP (Gordon Burditt) Newsgroups: comp.unix.internals Subject: Re: How do you find the symbolic links to files. Message-ID: <44075@sneaky.UUCP> Date: 19 Dec 90 07:55:22 GMT References: <6647:Dec619:11:3690@kramden.acf.nyu.edu> <1990Dec7.192441.24778@dg-rtp.dg.com> <2707:Dec1001:26:4290@kramden.acf.nyu.edu> Organization: Gordon Burditt Lines: 23 >Sorry. What I meant was that the archiver can just squish the first N >zero-filled blocks it finds into holes. Then it writes zeros into the >remaining zero-filled blocks. There seems to be a prevailing theory that this method is portable. You take the value of st_blocks, the st_size of the file, any other portable fields of the stat structure you want, and the somehow-obtained block size (I'll grant that there may be a portable way of figuring this out, if we limit this to systems that have st_blocks), and obtain this mysterious value of N by way of another mysterious value of "number of blocks of holes we need to leave". Is there a portable way of computing this, without going to the raw disk and without write permission on the original file? You may NOT assume that the number of blocks in an indirect block is known, how many block numbers an indirect block holds, how many blocks are required to record the presence of holes ("excavation licenses"), nor that said numbers of blocks are independent of the order in which the file was filled in. Gordon L. Burditt sneaky.lonestar.org!gordon