From owner-freebsd-questions@FreeBSD.ORG Fri Jul 2 15:38:19 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 1DD91106566B for ; Fri, 2 Jul 2010 15:38:19 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [75.145.138.73]) by mx1.freebsd.org (Postfix) with ESMTP id CF4148FC20 for ; Fri, 2 Jul 2010 15:38:18 +0000 (UTC) Received: from [0.0.0.0] (ozzie.tundraware.com [75.145.138.73]) (authenticated bits=0) by ozzie.tundraware.com (8.14.4/8.14.4) with ESMTP id o62FcBHo093008 (version=TLSv1/SSLv3 cipher=DHE-DSS-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 2 Jul 2010 10:38:11 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <4C2E07E3.10501@tundraware.com> Date: Fri, 02 Jul 2010 10:38:11 -0500 From: Tim Daneliuk Organization: TundraWare Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 CC: freebsd-questions@freebsd.org References: <4C2DF07F.1020509@tundraware.com> <44630xq527.fsf@be-well.ilk.org> <20100702173504.c53738b2.freebsd@edvax.de> In-Reply-To: <20100702173504.c53738b2.freebsd@edvax.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.5 (ozzie.tundraware.com [75.145.138.73]); Fri, 02 Jul 2010 10:38:12 -0500 (CDT) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: o62FcBHo093008 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No 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:38:19 -0000 On 7/2/2010 10:35 AM, 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. :-) > > > > Some OSs report both LZ and MZ as being DOS .exe, some only report LZ. Either way, when processing data files, there needs to be a deeper check to avoid the false positive. It may be that 'file' just isn't powerful enough to do this. -- ------------------------------------------------------------------------ Tim Daneliuk tundra@tundraware.com