A simple tool to verify CRC32 hashes in filenames against their content.
The preferred way of installing crccheck is through Go Modules. Before proceeding please first install
Mage. Then simply clone the project and run mage install inside.
git clone https://github.com/dnaka91/crccheck
cd crccheck
mage install
You can also install the application with the classical GOPATH approach. This doesn't use Mage or any dependency management, but there is a chance for dependencies to have breaking changes and the build may fail.
go get -d github.com/dnaka91/crccheck
If you prefer to use Docker to run the application, there is also an image available.
Make sure to map the current working directory (or any folder where you want to search for files) to the
folder /tmp.
docker run --rm -it -v $(pwd):/tmp dnaka91/crccheck
Let's assume we have a file with some content and the hash value set to zeros in the file name. On first run the check will detect a MISMATCH as content and hash don't match.
After running again but with the argument -u, the hash will be updated.
The next time we run crccheck hash value and content match.
$ crccheck
file[00000000].txt - MISMATCH
$ crccheck -u
file[00000000].txt - UPDATED
$ crccheck
file[6515BCC3].txt - OK
To print further options and descriptions run crccheck with the argument -h.
$ crccheck -h
This project is licensed under Apache 2.0.
Content type
Image
Digest
Size
10.3 MB
Last updated
over 7 years ago
docker pull dnaka91/crccheck