Quick, automated way to verify the copy of a folder?

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.


Solution 1:

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