Date: Wed, 30 Mar 2005 05:29:14 +0000 (UTC) From: Christopher Nehren <apeiron+usenet@coitusmentis.info> To: freebsd-questions@freebsd.org Subject: Re: md5 Message-ID: <slrnd4keb6.dgp.apeiron%2Busenet@prophecy.dyndns.org> References: <a87eda32050329192919ed1f08@mail.gmail.com> <44ekdx94w7.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2005-03-30, Lowell Gilbert scribbled these curious markings: > Matt Kosht <matt.kosht@gmail.com> writes: > >> Is there a simple way to compare the md5 checksum of a file, to a file >> that contains possibly more than one md5 checksum entry in it? Kind >> of like mdsum -c does? > > I've never heard of mdsum, but try mtree(8). Matt is (modulo a typo) referring to the GNU tool md5sum, which is oh-so-conveniently named differently than the FreeBSD utility (which causes programs that call it, like mplayer modulo the patch that I sent in, to fail with "md5sum: not found" errors). To answer Matt's original question, I've found that something like this works well. This assumes that CHECKSUM contains the actual checksum of the file, and only the checksum of that file. md5 FILE > mine cmp mine CHECKSUM Not as short as the GNU version, but still mostly functional. Though, now that I write this, I remember having written a Perl program that checks SFV sums against a given .sfv file. The principle is more or less the same for checking MD5 sums, or $FOO sums, plus a bit of processing. I'll see if I can't modify that program to do the sort of thing that matt wants. Best Regards, Christopher Nehren -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCSjllk/lo7zvzJioRAjwYAJ99c7VbvBefbqW2XUHeoD759YxiGQCgs3Z/ +pzROFVhJ3r0dRiwM3sFrpo= =R79C -----END PGP SIGNATURE----- -- I abhor a system designed for the "user", if that word is a coded pejorative meaning "stupid and unsophisticated". -- Ken Thompson If you ask the wrong questions, you get answers like "42" and "God". Unix is user friendly. However, it isn't idiot friendly.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrnd4keb6.dgp.apeiron%2Busenet>