coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the difference between --binary and the default of md5sum?


From: Eric Blake
Subject: Re: What is the difference between --binary and the default of md5sum?
Date: Mon, 09 Jul 2012 04:30:23 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/06/2012 09:18 AM, Peng Yu wrote:
> Hi,
> 
> I don't see any difference between the two md5sum commands (on Mac OS).
> 
> ~/linux/test/gnu/gnu/coreutils/md5sum/--binary$ ./main.sh
> md5sum `which md5sum`
> which md5sum
> 02389bdcb510f7a2667f94c4264bebd8  /opt/local/libexec/gnubin/md5sum
> md5sum -b `which md5sum`
> which md5sum
> 02389bdcb510f7a2667f94c4264bebd8 */opt/local/libexec/gnubin/md5sum
> 
> ~/linux/test/gnu/gnu/coreutils/md5sum/--binary$ cat main.sh
> #!/usr/bin/env bash
> 
> set -v
> md5sum `which md5sum`
> md5sum -b `which md5sum`
> 
> As mentioned at http://cygwin.com/cygwin-ug-net/using-textbinary.html,
> the difference between --binary and default is only important on
> windows, right?

It only matters on non-posix systems where fopen(name,"rb") behaves
differently from fopen(name,"r").  Windows is the most popular of these
systems; and you are correct that Mac OS is not impacted.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org



Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]