Bug 221201 - unexpected results from the "file" command
unexpected results from the "file" command
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: file (Show other bugs)
4.4
All Linux
medium Severity urgent
: ---
: ---
Assigned To: Martin Bacovsky
http://www.1mage.com
:
: 221202 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-02 17:31 EST by Peter Anderson
Modified: 2007-11-16 20:14 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-05 09:25:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Anderson 2007-01-02 17:31:07 EST
Description of problem:
Executing the "file" command against purely ASCII text files returns a variety 
of spurious results.  Some files return:

file1: sticky Bio-Rad .PIC Image File 12330 x 11830, 16707 images in file
or
send.to.lqm: Bio-Rad .PIC Image File 12320 x 11830, 16707 images in file
or
file3: 
svm.ics: PC icon data

The "send.to.lqm" file (attached) is only 59 characters long but the "file" 
command thinks that it is an image file 12320 x 11830 with 16707 images!?!

Files are ASCII text with carriage-return/line-feed delimeters and some contain 
a Top-of-form character (012).


Version-Release number of selected component (if applicable):
Advanced Server 4 (Nahant Update 4)
Kernel 2.6.9-42.0.3.ELsmp on an i686

The file command, when executed as "file -v" returns
file-4.10
magic file from /usr/share/file/magic


How reproducible:
execute "file" against the attached file


Steps to Reproduce:
1. execute "file" against the attached file
2.
3.
  
Actual results:
send.to.lqm: Bio-Rad .PIC Image File 12320 x 11830, 16707 images in file


Expected results:
send.to.lqm: ASCII text

Additional info:
Comment 1 Tim Waugh 2007-01-03 07:02:24 EST
Fixing component and reassigning.
Comment 2 Tim Waugh 2007-01-03 07:02:56 EST
*** Bug 221202 has been marked as a duplicate of this bug. ***
Comment 3 Martin Bacovsky 2007-04-05 09:25:19 EDT
When file is detecting file type it takes rule by rule from its database until
first match. When no rule matches it is plain text or data file. This is the way
how "file" recognize plain text, because we cannot make rule for it. As 'file'
db grows it is more likely we find false positive match. This is not nice, but
also not a bug.













Note You need to log in before you can comment on or make changes to this bug.