Subject: Re: md5sum uses text mode, not binary mode
From: [email-masked] (Darren Evans)

19 Jun 1998 23:45:41 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]

I would take a guess and say its something to do with not running in binary
mode.

mount -b whatever

I would like to know what someone else's setup is for this, so I can
understand
and mimmick it :-)

Where does mount read/write its settings to, the registry through cygnus?
<shrug>
Memory space?

>The md5sum program seems to be reading it's files in text mode
>instead of binary mode.  That seems to make md5sum mostly useless.
>
>Here's what makes me think md5sum is using text mode.
>
>First, md5sum calculates the same signature regardless of whether it
>reads from stdin or whether it opens the file itself:
>
>	$ md5sum foo.exe
>	d4bb47940abe12e88cbf5286f3f0664b  foo.exe
>	$ md5sum < foo.exe
>	d4bb47940abe12e88cbf5286f3f0664b  -
>
>Next, md5sum calculates the same signature even if its input came
>from `cat'.
>
>	$ cat foo.exe | md5sum
>	d4bb47940abe12e88cbf5286f3f0664b  -
>
>Finally, `cat' obviously uses text mode:
>
>	$ cat foo.exe | wc
>	     11      48    2098
>	$ ls -l foo.exe
>	-r-xr-xr-x   1 544      everyone  1190912 Jun 17 16:15 foo.exe
>	$
>
>Clearly, `cat' read only the first 2098 bytes.  I infer that it saw
>a ^Z and stopped, implying that `cat' reads its files in text mode.

--------------------------------------------------
 Darren Evans
 Systems Engineer/Systems Operation Group
 Online Magic Ltd FAX                0171 573 5961
 DSS/DH Key ID 0x23BEBE28        FAX 0171 573 5959
 05AE D632 E729 57B3 EBE6 6E41 D527 B739 23BE BE28
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".