Verifying file integrity with md5sum
To check a files checksum simply run the following command:
jesterj@jesterj-laptop:~$ md5sum file1
f5fa31b4e964cc2a86140bc2a2e11a13 file1
This does a check of the contents of the file and compares to the 128 bit key located in the header of the file.
To check a group of files then you can do the following.
jesterj@jesterj-laptop:~$ md5sum password* > md5checksums.txt
jesterj@jesterj-laptop:~$ md5sum password*
f5fa31b4e964cc2a86140bc2a2e11a13 password
67c2a19b0fb22552a5aa7cdc6ede2634 password.gpg
f5fa31b4e964cc2a86140bc2a2e11a13 password.orig
11b4f8cd65095066a644139500309bad passwords
3295d069764198d327edeba43f2b301c passwords.gpg
jesterj@jesterj-laptop:~$ md5sum -c md5checksums.txt
password: OK
password.gpg: OK
password.orig: OK
passwords: OK
passwords.gpg: OK
source:
http://linux.byexamples.com/archives/198/md5-checksum-how-to/