title | author | date | url | thumbnail | categories | |
---|---|---|---|---|---|---|
Recursively md5/sha1/sha256/sha512 a directory with files |
svennd |
2016-09-12 13:53:09 +0000 |
/recursively-md5sha1sha256sha512-a-directory-with-files/ |
/img/2021/03/simon-stratford-_ILkd7aVqAM-unsplash.jpg |
|
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!