RSS



How to generate and check md5 sums.

Mon, Aug 28, 2006

ArsGeek, Linux, Ubuntu

Talk about it in our Forums

md5 this sucka

md5 sums are extremely useful. They let us know if something is what we really expect it to be. for instance, if you create a program, and compress it before sending it off, you can generate an md5 sum for it so others can validate that the compressed bit of code they’ve just downloaded is really yours or not.

I use md5 sums a bunch. I’ve even created one for my wife. Let’s use her as an example. Well, you’ll have to get your own wife, or borrow someone else’s for this particular demonstration, as mine is already taken (as you can tell by her md5 sum).

First we’ll create a file called wife. No giggles please.

touch wife

Now we’ll date the wife.

date > wife

So we’ve got a wife and we’ve dated her. Perhaps I should be doing this with a fiance or something but we’ve settled on wife, so that’s what we’ll use. Let’s give the wife an md5 sum.

md5sum wife > wife.md5

Now wife.md5 contains the md5 sum for the wife. You’ll see the check sum and the name of the file it referes too.

cat wife.md5

So now we can see all these numbers, but what to do with them? If you want to check the validity of the wife, you can use md5 to do this.

md5sum -c wife.md5

All should be good with the world. This is useful also to do with .iso files and whatnot to ensure that they haven’t been compromised or corrupted during download.

geek out.

Popularity: 1% [?]

Share and Enjoy:
  • Digg
  • del.icio.us
  • MisterWong
  • Reddit
  • Technorati
  • BlinkList
  • Facebook
  • Fark
  • Mixx
  • Slashdot

This post was written by:

arsgeek - who has written 1980 posts on ArsGeek.


Contact the author

2 Comments For This Post

  1. papercodes Says:

    Nice tutorial. pretty simple and straightforward. thanks!

  2. arsgeek Says:

    No problem!

    geek out.

Leave a Reply