🌑

Linhost.info

Hash a directory with md5deep - Part 1

File integrity is no joke and system administrators know the severity of dealing corrupt files. The problem administrators face is that unlike users, administrator have to manage servers with hundreds of thousands of files in each directory that have to be hashed. This lends it self to a few problems: hashing file by file is out of the question and a waste of time, which means we are left to find a solution that can work on a recursive manner. md5deep checksums

Recursive operation - md5deep is able to recursively examine an entire directory tree. That is, compute the MD5 for every file in a directory and for every file in every subdirectory.

For the Windows platform you can use md5deep which is a cross platform solution, works perfectly and best of all can handle a large number of files without breaking a sweat. It will literally create a checksum for all the files on the directory where md5deep is being used, the results can then exported to a single file where they can be used for verification at a later time.

md5deep is a software package used in the computer security, system administration and computer forensics communities for purposes of running large numbers of files through any of several different cryptographic digests. Source: Wikipedia http://en.wikipedia.org/wiki/Md5deep

md5deep is managed from the command line, however it’s very easy to use considering it will be in charge of creating checksums for a large number of individual files.

How do we use it ?

md5deep example First of all you can download md5deep from SourceForge.net. After you download md5deep I recommend you move the executable over to the C:Windows directory for easy access from the command prompt. For this tutorial I will be hashing a single directory. Start by opening a command prompt : Start > Accessories > Command Prompt On the Command Prompt type :

md5deep -rel “test_directory” > results_file.md5

Explanation of the command

  • r = recursive operation

  • e = compute estimated time remaining for file name

  • l = print relative paths for file name

  • “test_directory” = this points md5deep to the directory you wish to checksum

  • > results_file.md5 = is the file where all the results will be written to, you can name it whatever you want.

After md5deep is done you can open results_file.md5 to view and analyze the results.

Conclusion

md5deep is a simple tool that should be part of your arsenal after all who can complain about file integrity.

Part 2 of this tutorial: Compare Hashes With md5deep

md5deep Home page Md5deep manual

, , , — Feb 28, 2010