<br><br><div class="gmail_quote">On Thu, Nov 5, 2009 at 1:00 PM, <span dir="ltr"><<a href="mailto:general-request@brlug.net">general-request@brlug.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
1. md5sum and diff? (Brad Bendily)<br>
2. Re: md5sum and diff? (William Anderson)<br>------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 5 Nov 2009 10:23:16 -0600<br>
From: William Anderson <<a href="mailto:whanders@lasthonorableman.net">whanders@lasthonorableman.net</a>><br><br>
You should be able to just copy the md5sum from a website into a text<br>
file and just let md5sum do a check:<br>
<br>
$ md5sum testfile<br>
68b329da9893e34099c7d8ad5cb9c940 testfile<br>
$ md5sum testfile > testfile.md5<br>
$ md5sum -c testfile.md5<br>
testfile: OK<br>
<br>
The format for the check file is the md5sum, two spaces, and the file<br>
name. You can also specify multiple files, one per line, and check<br>
several files at once (e.g. if your installing a piece of software and<br>
serveral dependencies, you can just download all the tar balls, copy the<br>
md5sum for each into a single file and let md5sum check them all).<br>
<br><br></blockquote><div><br></div><div>Nifty. Didn't know about the "-c" flag. I think you missed a file arg in there though?</div><div>md5sum -c testfile testfile.md5</div><div>testfile: OK</div><div><br>
</div><div>I'm trying to figure out something even lazier.</div><div><br></div><div><div>$ md5sum pcmciafloppy.img | sed 's/*/ /' > local.md5; curl <a href="ftp://ibiblio.org/pub/Linux/distributions/damnsmall/current/pcmciafloppy.img.md5.txt">ftp://ibiblio.org/pub/Linux/distributions/damnsmall/current/pcmciafloppy.img.md5.txt</a> > remote.md5; diff local.md5 remote.md5</div>
<div>$</div></div><div><br></div><div>How could I use i/o redirection to make it simpler? The diff man page says it can read from the input line, but I'm not sure how to make that work.</div><div><br></div><div>John</div>
</div>