Date: Fri, 02 Jul 2010 10:38:11 -0500 From: Tim Daneliuk <tundra@tundraware.com> Cc: freebsd-questions@freebsd.org Subject: Re: 'file' Command Giving False Positives Message-ID: <4C2E07E3.10501@tundraware.com> 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 7/2/2010 10:35 AM, 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. :-) > > > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C2E07E3.10501>