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.

Looking for the best way to easily validate the integrity of files/folder in OS X when copied from one location to another.

I've downloaded SuperSFV but it appears to be very slow. Also new to the concept of checksums, so looking for easiest/best practice to ensure that a copied directory or file(s) are identical on the destination as they were on the source.

share|improve this question

2 Answers 2

You can find the checksum of a file by typing in Terminal :

md5 myfile.ext

Example :

user1@machine ~ $ md5 myfile.ext 
MD5 (myfile.ext) = d7badf415dbd52c2c8b51e564baef8be

edit:

For all files in a directory :

for file in * ; do md5 $file; done
share|improve this answer
    
how would I process an entire folder? –  Josh Newman Jul 28 '10 at 23:15
1  
for file in * ; do md5 $file; done –  Kami Jul 28 '10 at 23:22
1  
Thanks - now how do I (simply) run and compare it on the destination once copied? –  Josh Newman Jul 29 '10 at 1:51

IIRC digest commands have been invoked slightly different in some versions of OSX. I'm talking like, Tiger as opposed to Snow Leopard, but I still know some people using Tiger. So, just in case 'md5' doesn't work by itself, try:

openssl md5 myfile.ext

[edit]

And, FWIW, I have a bash alias in my .bashrc:

alias md5sum='openssl md5'

It just fits better with my Linux habits.

share|improve this answer
    
"digests have changed in some versions of OSX" are you mad ? MD5 is a well defined hash algrorithm ! It will be full of nonsense to change it ! –  Kami Jul 30 '10 at 13:36
    
Ugh. Sorry. Totally not what I meant. What I mean is that digest commands changed. I seem to remember a day when a bare md5 command at the standard command line didn't work, and you had to do openssl md5 file.ext, or, openssl then md5 file.ext at the OpenSSL> prompt. –  VxJasonxV Aug 2 '10 at 23:47

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.