With the commands md5sum
, sha1sum
, sha256sum
I can take a text file having an hash and a path per line and verify the entire list of files in a single command, like sha1sum -c mydir.txt
. (Said text file is easy to produce with a loop in find
or other.)
Is there a way to do the same with a list of CRC/CRC32 hashes?
Such hashes are often stored inside zip-like archives, like ZIP itself or 7z. For instance:
$ unzip -v archive.zip
Archive: archive.zip
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
8617812 Stored 8617812 0% 12-03-2015 15:20 13fda20b 0001.tif
Or:
$ 7z l -slt archive.7z
Path = filename
Size = 8548096
Packed Size =
Modified = 2015-12-03 14:20:20
Attributes = A_ -rw-r--r--
CRC = B2F761E3
Encrypted = -
Method = LZMA2:24
Block = 0
7z h
is a recent example of tool for recursive hashing in CRC32 and more. – Nemo Dec 20 '15 at 09:18