How do you find the symbolic links to files.
Gordon Burditt
gordon at sneaky.UUCP
Wed Dec 19 18:55:22 AEST 1990
>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 <handwave>
<mumble> <black magic> 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
More information about the Comp.unix.internals
mailing list