[brlug-general] General Digest, Vol 77, Issue 1

William Anderson whanders at lasthonorableman.net
Fri Nov 6 09:23:06 CST 2009


On Thu, Nov 05, 2009 at 10:13:51PM -0500, John Hebert wrote:
> Nifty. Didn't know about the "-c" flag. I think you missed a file arg in
> there though?
> md5sum -c testfile testfile.md5
> testfile: OK

I've never had to specify the file to check on the command line; it
should be in the testfile.md5:

$ cat testfile.md5 
68b329da9893e34099c7d8ad5cb9c940  testfile
$ md5sum -c testfile.md5 
testfile: OK


> I'm trying to figure out something even lazier.
> 
> $ md5sum pcmciafloppy.img | sed 's/*/ /' > local.md5; curl
> ftp://ibiblio.org/pub/Linux/distributions/damnsmall/current/pcmciafloppy.img.md5.txt>
> remote.md5; diff local.md5 remote.md5
> $
> 
> 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.
> 
> John


I wouldn't even do a diff; something like

curl ftp://..../pcmciafloppy.img.md5.txt | md5sum -c -


assuming the pcmciafloppy.img.md5.txt is in the write format for your
version of md5sum to use and pcmciafloppy.img is in the current
directory.

Bill
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://brlug.net/pipermail/general_brlug.net/attachments/20091106/aa08ab77/attachment.bin>


More information about the General mailing list