I'm interested in storing an indicator of file / directory integrity between two archived copies of directories. It's around 1TB of data stored recursively on hard drives. Is there a way using OpenSSL to generate a single hash for all the files that can be used as a comparison between two copies of the data, or at a later point to verify the data has not changed?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
You could recursively generate all the hashes, concatenate the hashes into a single file, then generate a hash of that file. |
|||
|
|
|
You can't do a cumulative hash of them all to make a single hash, but you can compress them first then compute the hash:
to recursively hash each file:
|
|||||||||
|
|
Doing a md5 sum on the tar would never work unless all of the metadata (creation date, etc.) was identical as well, because tar stores that as part of its archive. I would probably do an md5 sum of the contents of all of the files:
|
|||
|
|