md5sum digests

Generate an md5 checksum of [filename]:

md5sum [filename]

You can compare the output to the md5 checksum you downloaded with [filename] or you can use the -c flag to have md5sum do the comparison for you:

md5sum -c [checksum_filename]

E.g:

whoever@wherever ~ $ md5sum -c portage-latest.tar.bz2.md5sum 
portage-latest.tar.bz2: OK

If you have a digests file, this will contain the checksums for a number of files. E.g. Here's one from the gentoo livedvd-amd64-multilib-10.1.iso.DIGESTS:

# MD5 HASH
fc94c887efea405b7aff6b62ab10e12a  livedvd-amd64-multilib-10.1.iso
dc311f02c98ce99f4aa860c8e30f5910  livedvd-amd64-multilib-10.1.iso.CONTENTS
f4fa931a5637a55d58d76db788dbf46e  livedvd-amd64-multilib-10.1.iso.CONTENTS-squashfs.gz
# SHA1 HASH
e6d0ddd45a0ae280deae6de43c548cc31496a9a0  livedvd-amd64-multilib-10.1.iso
255c08c0595d3498061434278166e20320f0b0a3  livedvd-amd64-multilib-10.1.iso.CONTENTS
49bea82820ec53aa5da0aa2f797371dce1c4738d  livedvd-amd64-multilib-10.1.iso.CONTENTS-squashfs.gz

To automatically check all files listed in this digest, use the md5sum -c flag:

md5sum -c [digests_filename]

E.g:

whoever@wherever ~ $ md5sum -c livedvd-amd64-multilib-10.1.iso.DIGESTS
livedvd-amd64-multilib-10.1.iso: OK
livedvd-amd64-multilib-10.1.iso.CONTENTS: OK
livedvd-amd64-multilib-10.1.iso.CONTENTS-squashfs.gz: OK

If any of the files listed in the digest are missing you'll get a warning message.

Last modified: 18/12/09 13:49:20
Go to top

Related Pages

No related pages or links.

Login/out

Login

Forgot Password?
Go to top
Go to top