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.

In snow leopard there is program that can do md4 checksums. How can I verifiy a .md5 file?

share|improve this question
    
is there md5? The two are interchangeable. –  Majenko Mar 17 '11 at 14:46
    
EXAMPLE: genunix.org/dist/windows/liveusb/OsolLiveUSB003.md5sum and i have to validate that –  tapioco123 Mar 17 '11 at 15:06
add comment

3 Answers

up vote 1 down vote accepted

The solution was simply:

port install cfv

and read the manual

share|improve this answer
1  
seeing someone answering his own questions and accepting them, after getting it spelled out nicely really pisses me off. Thanks dude, remind me not to help you any more. –  Florenz Kley Mar 5 '12 at 17:08
1  
Actually his answer is the best. cfv can create md5 and can also verify them. Why do manual comparing when I have a large set of files? Thanks for the answer. –  therealmarv Feb 20 at 2:00
add comment

I see two ways for you,

  1. one is easier and means installing additional software,
  2. the other means writing a little script to automate the checksumming.

1. install GNU md5:

get macports for your system from http://www.macports.org and install the base package. Then, install the port "md5sha1sum", which has the option "-c" to read a file containing checksums and compare files to it.

or, 2. do it with what you have:

I assume you have a MD5 checksum file of the form:

0fd81f886638a12ed9efe4fd8b44187d  dir1/dir2/file4
bc2a22d0fee688065ea19e44dae88e19  dir1/file3
fa9b969a22077e46131cdd6b602a208c  dir3/file5
5c4a2bdccf48c3e7bf7489f24ac5fcb1  file1
7e06cbbb761e90e2e059657927b43f5c  file2

(note that the separator are 2 spaces)

now, create new MD5 checksums locally with openssl, like:

find * -type f | xargs openssl md5 >openssl-md5

which will produce

MD5(dir1/dir2/file4)= 0fd81f886638a12ed9efe4fd8b44187d
MD5(dir1/file3)= bc2a22d0fee688065ea19e44dae88e19
MD5(dir3/file5)= fa9b969a22077e46131cdd6b602a208c
MD5(file1)= 5c4a2bdccf48c3e7bf7489f24ac5fcb1
MD5(file2)= 7e06cbbb761e90e2e059657927b43f5c

the output is different, but you can transmogrify that to match what GNU md5 makes:

cat openssl-md5 | sed -e 's/^MD5(\(.*\))= \(.*\)/\2 \1/'

0fd81f886638a12ed9efe4fd8b44187d  dir1/dir2/file4
bc2a22d0fee688065ea19e44dae88e19  dir1/file3
fa9b969a22077e46131cdd6b602a208c  dir3/file5
5c4a2bdccf48c3e7bf7489f24ac5fcb1  file1
7e06cbbb761e90e2e059657927b43f5c  file2

this gives you a checksum file to compare to the original checksum file. Do a diff and you're finished ;-)

share|improve this answer
add comment

In OSX, it's simply md5 or openssl md5

md5 /path/to/file

or

openssl md5 /path/to/file

Edit for clarification: You would then compare the output of the md5 command to the values in the .md5sum file to verify that the files are the same.

share|improve this answer
    
no, i ask how to check a .md5sum file, not how to generate it! –  tapioco123 Mar 17 '11 at 15:02
    
The contents of the MD5sum file are the md5 sum. You generate a sum on the file in question, and compare :-) –  Hyppy Mar 17 '11 at 15:05
    
If you dont know, this is an md5sum file genunix.org/dist/windows/liveusb/OsolLiveUSB003.md5sum and i have to validate that –  tapioco123 Mar 17 '11 at 15:06
    
You would run "md5 OsolLiveUSB003-src.zip", and compare the output to the string of hex digits in the file, then do the same for the other filename. I edited the answer for clarification. –  Hyppy Mar 17 '11 at 15:10
    
no, again it is a manual comparation, i cannot compare 50000 files by hand... for example.. –  tapioco123 Mar 17 '11 at 15:16
show 1 more comment

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.