From owner-freebsd-questions@FreeBSD.ORG Fri Jul 2 15:43:26 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 764E1106566B for ; Fri, 2 Jul 2010 15:43:26 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 2EA1F8FC1F for ; Fri, 2 Jul 2010 15:43:25 +0000 (UTC) Received: from c83-255-61-120.bredband.comhem.se ([83.255.61.120]:11273 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.71) (envelope-from ) id 1OUiOK-0000ws-4m for freebsd-questions@freebsd.org; Fri, 02 Jul 2010 17:43:02 +0200 Received: (qmail 51547 invoked from network); 2 Jul 2010 17:42:59 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 2 Jul 2010 17:42:59 +0200 Received: (qmail 54415 invoked by uid 1001); 2 Jul 2010 17:42:59 +0200 Date: Fri, 2 Jul 2010 17:42:59 +0200 From: Erik Trulsson To: Polytropon Message-ID: <20100702154259.GA54405@owl.midgard.homeip.net> References: <4C2DF07F.1020509@tundraware.com> <44630xq527.fsf@be-well.ilk.org> <20100702173504.c53738b2.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100702173504.c53738b2.freebsd@edvax.de> User-Agent: Mutt/1.5.20 (2009-06-14) X-Originating-IP: 83.255.61.120 X-Scan-Result: No virus found in message 1OUiOK-0000ws-4m. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1OUiOK-0000ws-4m 0ec7766fe8d8db4ac06ca1f90cfdd07e Cc: Lowell Gilbert , freebsd-questions@freebsd.org Subject: Re: 'file' Command Giving False Positives X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2010 15:43:26 -0000 On Fri, Jul 02, 2010 at 05:35:04PM +0200, Polytropon wrote: > On Fri, 02 Jul 2010 11:25:20 -0400, Lowell Gilbert 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. -- Erik Trulsson ertr1013@student.uu.se