I have a lot of files that I've been transferring around my network and to external hard drives. For example, I just copied a folder with files representing an old laptop's disk image (created with clonezilla) from an external hard drive to my macbook pro.

Is there an app or script I can use that would allow me to verify that all the files in the folder were copied correctly and without corruption? I want to be able to run something on the source and target folders that will give me confidence that they are identical. Ideally, the tool would be able to verify folders on a network drive as well.

2 Answers 2


Two easy ways, one CLI and the other with a GUI :

  1. With Terminal :
    • diff -rq folder1 folder2
  2. Using FileMerge (which comes with the Developer Tools) :
    • filemerge
  • diff -qr is awesome for quick and dirty checks.
    – Chealion
    Aug 18, 2010 at 19:55

The easiest way to do that would be to run a md5 sum on all the files and match it with the local set. I can't script off the top of my head at the moment, but that's how you would do it.

For future reference, don't copy folders. Tar / bzip them up and then move them. Your copy time will be significantly decreased and then it's easier to verify a successful copy.

  • good point. The problem with these particular copies is that the folders reside on an NTFS volume, so I don't have write access in OS X :/ Do you know of a way to compress the files on the NTFS volume before copy? Aug 18, 2010 at 19:31
  • @calavera: You could enable write support. ;)
    – Josh K
    Aug 18, 2010 at 19:50
  • Agree on tar.bz2 for easier verification, but time saving depend highly on the content. You'll spend a lot more time waiting for a collection of already compressed media files to archive than you'll ever save on the wire.
    – muddybulldog
    Aug 19, 2010 at 18:07
  • I don't want to write to my NTFS volume, I want to get stuff off of it so I can wipe it and do something else with it :) Also, muddybulldog touches on the other issue this would cause. The files are very large, so compressing them would likely take a long time for very little benefit considering that CloneZilla already gzip's the img files. For something smaller, compression would definitely make sense for quick checksumming. Aug 20, 2010 at 3:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .