Recursively md5/sha1/sha256/sha512 a directory with files
Posted on September 12, 2016 • 1 minutes • 69 words • Suggest Changes
A quick hack for checking content is consistent over systems using a hashing method. This is for md5, which is fast but some collision is possible if carefully crafted. Use this on each directory.
find . -type f -exec md5sum "{}" + > checksum.list
Then checking if both are equal :
diff first.list second.list
No difference : data on both ends same. This also works with sha256sum.
Good luck!