[EMAIL PROTECTED] (2003-08-15 at 1541.28 +0200):
> BTW: Would it be possible to get a sparse file by zeroing the unused
> bits? Then it would be quite space efficient (at least with some file
> systems).

Yes, try it with dd and cp (GNU version only?):

dd if=/dev/zero of=/tmp/zero-test count=1000
cp --sparse=always /tmp/zero-test /tmp/zero-sparse
ls -l /tmp/zero-test /tmp/zero-sparse
du -cs /tmp/zero-test /tmp/zero-sparse

If you get same byte size, 512000 bytes, but different block usage, 0
vs 503 here, your fs is doing sparse files. Another test I did here
with a 8258506 bytes file, composed by catting a real data file of
7745389 bytes, then 512000 zero bytes and a final 1117 byte group of
random data, gives an usage of 8098 blocks for the original and 7601
for the sparse copy.

What I do not know is how many fs support it, and if they can do on
the fly or a forced copy is needed, or if it is a good idea from
performance point of view.

Gimp-developer mailing list

Reply via email to