1

I need a tool to generate and maintain the checksum (MD5, SHA1, it does not matter) of all files in a folder or a set of folders, recursively.

Sometimes I will add/update/remove some files and I would like to not recalculate the checksum of the old files.

So, these are the requirements:

  • generate the first time the checksum of all files.
  • generate incrementally the checksum of the added/updated/removed files.
  • verify the checksum of the files.

Does anybody know such a tool?

Thanks in advance.

4 Answers 4

1

Here's a couple you can take a look at:

Fast File Integrity Checker

File Verifier++

I've used File Verifier++ in the past, it works quite well.

1
  • It seems that both of them do not allow an incremental update of the previously calculated hashes. Jun 19, 2010 at 11:28
1

I would put the files I need to keep track of in a subversion (or git) repository. Version control tools are good at keeping track of incremental updates.

2
  • Good point. Some files I want to check with the tool are already several git repositories, and all of them are backups! That sounds too much recursive, :-) Jun 19, 2010 at 12:02
  • You could set up backup repos for the git repos as an alternative to backing them up with an external tool. Then you just push to the backup repo each time you commit to it. You can also set up a "post-commit hook" to do that. It's a common enough use case that you could probably find a script that does exactly that. ....................... One of the nice things about doing things this way is that if your original repo gets corrupted, that corruption isn't propagated to your backup.
    – intuited
    Jun 29, 2010 at 2:57
1

You can also have a look at checksum:

A blisteringly fast, no-nonsense file hashing application for Windows. checksum is a program that generates and verifies SHA1 and MD5 hashes; aka. "MD5 Sums", or "digital fingerprints"; of a file, a folder, or recursively, even through an entire hard drive, does it very quickly, intelligently, and without fuss.

0

Disclaimer: I am the author of this library.

pyFileFixity, a Python 2 library, provides the tool "rfigc.py", which allows updating the database of hashes using:

  • --update to update previously generated hashes if the files changed.
  • --append to add new files where no hashes exist in the database.
  • --remove to remove hashes where the file does not exist anymore.

All of these options can be used in combination if you want, or separately if you want to reduce the risk of doing a mistake. Also, the database is a simple text file, so it should always be human readable.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .