'file' Command Giving False Positives

Erik Trulsson ertr1013 at student.uu.se
Fri Jul 2 15:43:26 UTC 2010

On Fri, Jul 02, 2010 at 05:35:04PM +0200, Polytropon wrote:
> On Fri, 02 Jul 2010 11:25:20 -0400, Lowell Gilbert <freebsd-questions-local at be-well.ilk.org> wrote:
> > Why is it incorrect?  "LZ" as the first two bytes in a file is (unless
> > my memory is badly mistaken) exactly what the old command.com looked for
> > as the flag of an executable.
> If I ask *my* memory, it tells me that what you mean is "MZ". As
> far as I remember, those are the initials of a programmer involved
> with the creation of the DOS binary executable format. :-)

"MZ" is indeed what an MS-DOS style .EXE file should start with.
For an MS-DOS .COM file there is no header or other metadata in the
file so there is no good way of distinguishing it from any other binary

<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se

More information about the freebsd-questions mailing list