Linux – tar padding with zeros

linuxtar

When performing a tar on a bz2 compressed file I am encountering the following error,

tar: dump.sql: File shrank by 19573448400 bytes; padding with zeros

Can anyone point what might be causing this issue ?

Thanks.

Best Answer

It's not an error. It's INFO.

I'm willing to bet you're compressing/decompressing a Virtual Machine image, or otherwise sparsely-allocated file.

Bzip2 has detected that the file is mostly zeroes, and compressed it so that they're not there in the compressed file.

This is the difference between actual size and apparent size of sparse files.

Related Topic