Last active
May 20, 2016 17:09
-
-
Save areyoutoo/6b46f590ad105d6994668e0ab4916d96 to your computer and use it in GitHub Desktop.
Work wants to double-check for byte-wise matches after some file servers are copied. This script compares SHA hashes for each file in the resulting trees.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find MOUNT1 -type f -exec shasum {} \; | tee logfile1 | |
find MOUNT2 -type f -exec shasum {} \; | tee logfile2 | |
sort -k2 logfile1 > logfile1s | |
sort -k2 logfile2 > logfile2s | |
diff -u logfile[12]s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment