Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to use md5deep to check that some copied directories are copied correctly. But seems md5deep doesn't use the filenames stored in the genearted .md5-files when matching!

This actually means, that if I copy a big directory structure (with duplicated files) and something went wrong, so one directory contains files (with correct filenames and wrong content), then md5deep will NOT find this as a mismatch!

EXAMPLE:

Imagine we have the following file structure:

photos\public_photo1.jpg
photos\public_photo2.jpg
photos\private_photo1.jpg
photos\photos_my_mother_can_see\public_photo1.jpg
photos\photos_my_mother_can_see\public_photo2.jpg

As you can see, two of the photos are duplicated files!

Now imagine that my copying utility failed, so that the CONTENT of public_photo1.jpg actually was the CONTENT of private_photo1.jpg. The directory-structure is still the same!

On my source-drive I did the following to generate the MD5-file:

md5deep64 -rel c:\photos\*.* > result.md5

(I use relative paths!)

Afterwards I match the files with the destination-folder:

md5deep64 -X result.md5 -r c:\photosdest

No changes found!!

If I even do a match (md5deep64 -wm result.md5 -r c:\photosdest) I can even see, how it didn't use the filenames to compare:

c:\photosdest\photos_my_mother_can_see\public_photo1.jpg matched c:\photos\private_photo1.jpg
c:\photosdest\public_photo1.jpg matched c:\photos\photos_my_mother_can_see\public_photo1.jpg
c:\photosdest\public_photo2.jpg matched c:\photos\public_photo2.jpg
c:\photosdest\photos_my_mother_can_see\public_photo2.jpg matched c:\photos\public_photo2.jpg
c:\photosdest\private_photo1.jpg matched c:\photos\private_photo1.jpg

:-(

Is it a feature or a bug?

Is there any way I can force md5deep is compare the MD5 of files with the same filename and location? ...or should I start looking for another md5-generator/comparer?

share|improve this question

1 Answer 1

This is a feature of md5deep, not a bug. It sounds like you want to use the companion program hashdeep. That program comes with md5deep.

md5deep was intended to find files regardless of the filename. For example, when searching for the rootkit EVILEVIL.EXE, the user would want to find any file with the same hash as EVILEVIL, even if it had been renamed fuzzykitten.exe.

The hashdeep program, on the other hand, can do an audit, which checks the file size, location, and hash when matching.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.