[BusyBox] cp.c SUSv3 compliance

Glenn McGrath bug1 at iinet.net.au
Sun Dec 12 06:02:35 UTC 2004


On Sat, 11 Dec 2004 19:24:03 -0500
Rob Landley <rob at landley.net> wrote:

> I remember thinking that it would be nice if cp and tar and such
> understood about holes in files, but that's been about the limit of my
> involvement in it.

Do you know of any references describing holes in files, ive heard
about, but dont understand them.

>From tar's man page

"A hole in a file is a section of the file's contents which was never
written. The contents of a hole read as all zeros. On many operating
systems, actual disk storage is not allocated for holes, but they are
counted in the length of the file. If you archive such a file, tar could
create an archive longer than the original."

It seems a bit strange to me, how do you tell the difference between a
hole in a file and a deliberate string of 0's such as at the end of a
tar entry... or are strings of 0's automatically considered to be holes
wether 0's were written or not ?


Glenn



More information about the busybox mailing list