I want to verify integrity of folder. The folder has so many files and folders. How to calculate hash value of directory as a whole on Ubuntu. md5sum calculate at only file level.
I want to verify integrity of folder. The folder has so many files and folders. How to calculate hash value of directory as a whole on Ubuntu. md5sum calculate at only file level.
For a list of md5sums:
And for an overall md5 checksum:
Example output:
Notice, at a folder with huge size, it can take very long.
Install md5deep with
The command
you will get a hash based on all the files in the directory. You can also use md5deep to compare hashes of the files in the dir.
I created dir-fingerprint that can be used to solve that. It creates fingerprint/hash for all the files in directory tree and saves it in a file, also telling you if the fingerprint has changed.
It can be installed with:
and used as:
with output:
and
.fingerprint
file createdI published a Python 3 package for that. Quick usage:
Works on Linux, Windows, works with S3 or GCS storage. See more at pyfstools .