file command returns incorrect MIME type?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 3/3/06, Benjamin Smith <lists@xxxxxxxxxxxxxxxxxx> wrote:
> Here's the problem:
>
> [ben@kepler tmp]# file -i presentation.ppt
> presentation.ppt: application/msword

Excerpt from /usr/share/magic.mime:

--- snip ---
# msword: file(1) magic for MS Word files
#
# Contributor claims:
# Reversed-engineered MS Word magic numbers
#

0	string		\376\067\0\043			application/msword
0	string		\320\317\021\340\241\261	application/msword
0	string		\333\245-\0\0\0			application/msword
--- snip ---

The middle one of those matches the first six bytes of a powerpoint
file.  Whether it also might match the first six bytes of some msword
documents, I don't know.

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux