[olug] md5's

Eric Penne epenne at yahoo.com
Thu Sep 28 13:10:31 UTC 2000


For the iso's I was have on the ftp site ee-epenne.unl.edu all the
md5sum values for the files are in the MD5SUMS files with the
respective file name next to the file.  So to compare the strings I
just did a:

md5sum 7.0-i386-disc1.iso; cat MD5SUMS|grep disc1

and it output:

<whole buncha letters and numbers> 7.0-i386-disc1.iso
<whole buncha letters and numbers> 7.0-i386-disc1.iso

and if the <whole buncha letters and numbers> match then the md5sums
match and you can be sure it is a good download.  The first line of the
output is from md5sum and the second line of output is from the
cat|grep command.  Be patient with this though because on the PIII 733
i have it took a while to md5sum the whole cd.

ERic

--- "Mark A. Martin" <mmartin at amath.washington.edu> wrote:
> You should already have the appropriate program on your system.  It's
> called md5sum.  You just run it against whatever you download and
> compare the string that it prints to stdout to the published string. 
> Try running md5sum against any file on your system to see what comes
> out.
> 
> For your own edification, type "man -k md5" and see what comes up on
> your system.  After doing this, look at the man page for md5sum.  The
> man page mentions that the complete documentation is contained in an
> info file.  Type "info md5sum" to access this.  The command
> 
> rpm -qf `which md5sum`
> 
> shows that md5sum is part of the textutils package on my (Mandrake)
> system, i.e. it's one of the GNU textutils.  This is also apparent
> from
> the man and info pages.
> 
> The process of comparing strings will be less error prone if you use
> the
> mouse to copy and paste the published string into a conditional such
> as
> 
> if [ published_string == `md5sum file | awk '{print $1}'` ]; then
>     echo -e "\nThe strings are the same.\n"
> else
>     echo -e "\nThe strings are different.\n"
> fi
> 
> Or better yet, write a short script that takes the published string
> and
> the filename as arguments and performs this task.  Here's a hint:
> Investigate the "read" command on the bash man page.
> 
> Examples from my system:
> 
> if [ 35303a9fce84148d6a0cbdc0bcce6b5e == `md5sum kdoc.pdf | awk
> '{print
> $1}'` ]; then
>     echo "The strings are the same."
> else
>     echo "The strings are different.";
> fi
> 
> The strings are different.
> 
> if [ 45303a9fce84148d6a0cbdc0bcce6b5e == `md5sum kdoc.pdf | awk
> '{print
> $1}'` ]; then
>     echo "The strings are the same."
> else
>     echo "The strings are different.";
> fi
> 
> The strings are the same.
> 
> Happy hacking,
> 
> Mark
> -- 
>
---------------------------------------------------------------------------
> Mark A. Martin					Dept of Applied Mathematics
> http://www.amath.washington.edu/~mmartin	University of Washington
>
---------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: olug-unsubscribe at bstc.net
> For additional commands, e-mail: olug-help at bstc.net
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: olug-unsubscribe at bstc.net
For additional commands, e-mail: olug-help at bstc.net



More information about the OLUG mailing list