Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8035407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:17:55+00:00 2026-06-05T02:17:55+00:00

Consider the following: % md5sum /dev/null d41d8cd98f00b204e9800998ecf8427e /dev/null % touch empty; md5sum empty d41d8cd98f00b204e9800998ecf8427e

  • 0

Consider the following:

% md5sum /dev/null
d41d8cd98f00b204e9800998ecf8427e  /dev/null
% touch empty; md5sum empty
d41d8cd98f00b204e9800998ecf8427e  empty
% echo '' | md5sum
68b329da9893e34099c7d8ad5cb9c940  -
% perl -e 'print chr(0)' | md5sum
93b885adfe0da089cdf634904fd59f71  -
% md5sum ''
md5sum: : No such file or directory

First of all, I’m surprised by the output of all these commands. If anything, I would expect the sum to be the same for all of them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:17:57+00:00Added an answer on June 5, 2026 at 2:17 am

    The md5sum of “nothing” (a zero-length stream of characters) is d41d8cd98f00b204e9800998ecf8427e, which you’re seeing in your first two examples.

    The third and fourth examples are processing a single character. In the “echo” case, it’s a newline, i.e.

    $ echo -ne '\n' | md5sum
    68b329da9893e34099c7d8ad5cb9c940 -
    

    In the perl example, it’s a single byte with value 0x00, i.e.

    $ echo -ne '\x00' | md5sum
    93b885adfe0da089cdf634904fd59f71 -
    

    You can reproduce the empty checksum using “echo” as follows:

    $ echo -n '' | md5sum
    d41d8cd98f00b204e9800998ecf8427e -
    

    …and using Perl as follows:

    $ perl -e 'print ""' | md5sum
    d41d8cd98f00b204e9800998ecf8427e  -
    

    In all four cases, you should expect the same output from checksumming the same data, but different data should produce a wildly different checksum (that’s the whole point — even if it’s only a single character that differs.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider following SWT code example: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java?view=co How can I separate the inline defined class?
Please consider following schema CREATE table articles ( id Int UNSIGNED NOT NULL AUTO_INCREMENT,
Please consider following sample table structure: +-------------------------------+--------------+------+-----+---------+-------+ | Field | Type | Null |
Consider following simple example: #!perl -w use strict; sub max { my ($a, $b)
Consider following make: all: a b a: echo a exit 1 b: echo b
Consider following entry in my mongo collection. { id : _0001, map : {
Consider following scenario: I have RESTful URL /articles that returns list of articles user
Consider following program: static void Main (string[] args) { int i; uint ui; i
Consider following script: SET LANGUAGE 'German' GO SET DATEFIRST 1 GO DECLARE @FullDate DATETIME
Consider following: $(#myform).attr({ action: @Url.Action(MVC.Thing.Delete().AddRouteValue(id, myJsModel.Id )) }); I'm trying to set the action

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.