Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


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
for file in * ; do md5 $file; done – Kami Jul 28 '10 at 23:22
Thanks - now how do I (simply) run and compare it on the destination once copied? – Josh Newman Jul 29 '10 at 1:51

There is a brew package cksfv which can do the trick. Works on Yosemite.

Install using brew:

brew install cksfv

Install using Boxen, using brew:

# Add this to your Puppetfile:
github "homebrew"

# Add to your personal manifest:
package { 'cksfv': ensure => present }

Create a .sfv file:

# one file
cksfv >

# many files
cksfv > my-two-files.sfv

# all files
cksfv * > all-files-in-this-dir.sfv

Verify a .sfv file:

cksfv -f
share|improve this answer

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


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


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.