A brief guide to check if an hash is correct.

Firstly generate the sha256sum of the file and store to a local file

sha256sum filename > filename.hash

then check if the file is changed

cat filename.hash | sha256sum --check

if the hash matches

filename: OK

else

filename: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match
Categories: BashServer

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published.