Is the md5sum linux command working right?

你离开我真会死。 提交于 2019-12-06 06:31:10

With that command, you are calculating the md5sum of a single newline character. Try instead:

echo -n "" | md5sum

You must eliminate the new line that echo produces

$ echo -n '' | md5
d41d8cd98f00b204e9800998ecf8427e

Try:

echo -n | md5sum

Without the '-n', echo outputs a newline, which md5sum duly processes.

use the more portable printf

printf "" | md5sum
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!