Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2010 17:42:59 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Polytropon <freebsd@edvax.de>
Cc:        Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>, freebsd-questions@freebsd.org
Subject:   Re: 'file' Command Giving False Positives
Message-ID:  <20100702154259.GA54405@owl.midgard.homeip.net>
In-Reply-To: <20100702173504.c53738b2.freebsd@edvax.de>
References:  <4C2DF07F.1020509@tundraware.com> <44630xq527.fsf@be-well.ilk.org> <20100702173504.c53738b2.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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
file.



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100702154259.GA54405>