How do you find the symbolic links to files.

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Fri Dec 7 06:00:52 AEST 1990


In article <1990Dec5.183223.28304 at specialix.co.uk> jonb at specialix.co.uk (Jon Brawn) writes:
> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> >In article <1990Dec5.052124.28435 at erg.sri.com> zwicky at erg.sri.com (Elizabeth Zwicky) writes:
> >> Unfortunately, you
> >> have to get pretty intimate with the disk to tell that the 20 meg of
> >> nulls aren't there
> >Hardly. You just look at the file size. Other than the file size, there
> >is no way a portable program can tell the difference between a hole and
> >an allocated block of zeros. If an archiver knows the block size and
> >sees that a file has N holes, it can just squish the first N holes it
> >finds, and write explicit zeros in the remaining zero-filled blocks.
> Umm? really? I wrote this program:
  [ ... ]
> 	printf("st_size %d\n",statb.st_size);

That is the logical size. The actual size on disk is st_blocks.

> Now, please demonstrate to your audience where the holes can be detected?

In a previous article.

---Dan



More information about the Comp.unix.internals mailing list