I’ll paraphrase the home page on zerofree, and I can predict what will pass through your mind after I’m finished: zerofree looks for free space on an ext2 system, and fills any non-zero space with zeroes.
And right now you’re thinking … what in the world would that be of any use for?! And I know that because that’s what I thought when I first read it.
I re-read it a couple of times too, thinking maybe I misunderstood. That does happen for me. Sometimes quite often.
As you can see, zerofree is the strong, silent type. 🙄
But to answer the question at hand, I can think of two things that zerofree might be useful for.
The first one is probably what the author had in mind, if I understand correctly: Write out zeros to deleted files, and then a dd-style image of the drive can be compressed further.
It makes sense — even if you delete a file, you leave traces of it on the drive, and something like dd doesn’t just ignore that space. If you need to transfer a file done that way, it might be wasteful to compress or transfer deleted information.
Again, if I understand correctly, it is conceivable that a block of zeros would save space over deleted information.
The second one is what I have in my head personally: as a file wiper. Delete a file and it’s not really gone. If needed, zerofree could double as a permanent eraser tool, convenient and useful for paranoiacs of all flavors.
Of course, tools like that exist — GNU shred has been around since the dawn of man — and work with a measure of reliability.
So maybe in that sense, zerofree is not particularly innovative. But useful, it should be.
Pingback: shred: A power for good or evil | Inconsolation