Checksum a file with md5sum

md5sum creates file hashes. The hash is solely based on the file contents (even if you change the file name, the hash remains the same).

$ md5sum README.md 
bb4955b6d0855ce20c30223273124dd7  README.md

To create a file containing hashes, do:

$ md5sum README.md > MD5SUM.txt

To verify if the file was not tampered:

$ md5sum -c MD5SUM.txt
README.md: OK

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s