[CentOS] Comparing directories recursively

Tue Nov 7 14:21:28 UTC 2017
Lamar Owen <lowen at pari.edu>

On 10/27/2017 05:27 PM, H wrote:
> What is the best tool to compare file hashes in two different drives/directories such as after copying a large number of files from one drive to another? I used cp -au to copy directories, not rsync, since it is between local disks.
I typically use 'rsync -av -c --dry-run ${dir1}/ ${dir2}/ ' (or some 
variation) for this.  rsync works just as well on local disks as 
remote.  This isn't as strong of a comparison as even an md5, but it's 
not a bad one and gives you a quick compare.

You can even use git for this: 'git diff --no-index ${dir1}/ ${dir2}/' 
and that would be a stronger comparison.