Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On suse10

md5sum myname

gives md5 hash as 49b0939cb2db9d21b038b7f7d453cd5d.

The file myname contains string "ravi"

while some of the online md5 hash generators for the same string seem to give a different hash

They spit out the hash for "ravi" as 63dd3e154ca6d948fc380fa576343ba6

Why is there a difference in md5sum for the same string "ravi"?

share|improve this question
Does your file include a new line or not? – cmouse Nov 11 '11 at 8:50

If you look at your file myname, you will probably find that it contains extra characters e.g.

od -x myname
0000000 6172 6976 000a

Note the 000a at the end of line 1. When you type ravi into the online form you are not entering the 000a as well so the md5sums are different.

You can see the effect of this like so

echo ravi | od -x 
0000000 6172 6976 000a

echo ravi | md5sum 
49b0939cb2db9d21b038b7f7d453cd5d  -

The answers are the same as for you file.

echo -n ravi | od -x 
0000000 6172 6976

echo -n ravi | md5sum
63dd3e154ca6d948fc380fa576343ba6  -

The results are the same as the online form.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.