I am using Ubuntu Server 11.10.
My problem is that the file
command detects files that should have had the video/mp2t
mime-type as application/octet-stream
So here is what I did:
I made sure that
/usr/share/mime/packages/freedesktop.org.xml
contained the correct mp2t description.I ran the
update-mime-database
command that, among other things, created a new magic file:/usr/share/mime/magic
.I discovered that when running
file -v
, it says that it is using/etc/magic:/usr/share/misc/magic
as magic files.So, I told the
file
command to use my new magic file:file -m /usr/share/mime/magic MY_VIDEOFILE
Here is where the problem starts. When running the file
command with my new magic file, I get the following output:
/usr/share/mime/magic, 1: Warning: offset `MIME-Magic' invalid
/usr/share/mime/magic, 1: Warning: type `MIME-Magic' invalid
/usr/share/mime/magic, 2: Warning: offset `[90:application/docbook+xml]' invalid
/usr/share/mime/magic, 2: Warning: type `[90:application/docbook+xml]' invalid
.
. (921 lines removed from the output)
.
/usr/share/mime/magic, 1173: Warning: offset `[10:text/x-tex]' invalid
/usr/share/mime/magic, 1173: Warning: type `[10:text/x-tex]' invalid
file: No current entry for continuation
It looks like the file
command expects magic files in a different format than the format of the magic files that update-mime-database
outputs.
What have I missed here?
How can I make the file
command accept new mime types?