checksum

Compress dd backups with sha1sum checksum

Instead of storing whole dd images, even if they’re just backups of small partitions, you can save space and bandwidth by piping dd into a compression utility like gzip. You can then unzip the files straight into sha1sum to get a checksum of what you just backed up.

A faster way to write out all zeros to a disk using checksums

You’re not going to write out all zeros, but the end case will be the disk is full of nothing but zeros. (or partition, like /dev/sdb3, which is what I used this for). The basic idea here is you read a disk, one arbitrary chunk at a time, compute the checksum for each chunk and only write out zeros to the chunks that are not all zeros already. But it all comes down to how expensive is it to write vs read.

sha1sum mass checking for tampered files

You might want to do this to make sure a set of configuration files don’t get changed, or to figure out which files get changed when you build that random source code as root! (note to self: don’t make as root unless you have to, rpmbuild is bad enough!)