Subject: Re: GNU "diff" considered damaged
To: Greywolf <greywolf@starwolf.com>
From: Mike Cheponis <mac@Wireless.Com>
List: netbsd-help
Date: 07/12/2001 14:17:38
On Thu, 12 Jul 2001, Greywolf wrote:
> Date: Thu, 12 Jul 2001 18:28:04 -0700 (PDT)
> From: Greywolf <greywolf@starwolf.com>
> # p.s. Tnx for your suggestion about "cmp". But having both "diff" and "cmp"
> # is sort of like having both "ls" and (a currently non-existent) "dir", yes?
>
> Not really.
>
> Diff will actually show the differences; cmp will merely abort at the first
> one and bitch mightily. Sometimes it is only wanted to know whether or not
cmp -l <file1> <file>
will dump every difference it finds; that's what I used.
> ...and why it reads BOTH files ALL THE WAY into memory is beyond me. You'd
> think they could do it chunks at a time (like any sane utility). 512K/file
> strikes me as plenty of data to operate on, maybe 1M/file.
Even if memory constrained, I wonder if they ever heard of "lseek(2)" ?
Well, I'd like not to just complain, but to actually fix the problem. But
since it's GNU, looks like I'll need to take it up with the GNU people, or
write a BSD-diff.
-Mike