Re:A snapshot of your computer with dd, pv and gzip - Part 1
by Yen on Friday July 19, 2013 @08:15PM
(#6073754)
The author mentions that removed files stick around on disk after being removed, and that this can increase the size of a compressed bit-for-bit copy.
They then suggest you can mitigate this by writing zeros to a file before rm'ing it. However, this is slow in the general case, and doesn't help if you've already rm'd the file.
As an alternative, the 'sfree' utility, available in the debian package 'secure-delete', can be used to fill the unallocated portions of a disk with zeroes (or random data).
sfree -llz <disk device>
will write zeroes to the free areas of a disk. -ll limits it to only one pass over the disk, and -z makes that pass write zeroes, instead of random data.
They then suggest you can mitigate this by writing zeros to a file before rm'ing it. However, this is slow in the general case, and doesn't help if you've already rm'd the file.
As an alternative, the 'sfree' utility, available in the debian package 'secure-delete', can be used to fill the unallocated portions of a disk with zeroes (or random data).
sfree -llz <disk device>
will write zeroes to the free areas of a disk. -ll limits it to only one pass over the disk, and -z makes that pass write zeroes, instead of random data.
man page: http://manpages.ubuntu.com/manpages/lucid/man1/sfill.1.html