MIME-type magic hierarcy
Colin Bartolome
colin at e-e.com
Wed Jan 23 20:40:17 EET 2008
I've got a similar problem. With rules like this:
0 string DOC
>144 string JDASH application/x-ichitaro4
I can make a test file that produces this output:
[user at host ~]$ file -im magic doc
doc: application/x-ichitaro4
[user at host ~]$
Then I can change the file so the DOC rule matches but the JDASH rules
doesn't. Then I get this output:
[user at host ~]$ file -im magic doc
doc:
[user at host ~]$
Also note what happens when I add the -k flag, as it matches all the DOC
rules but none of the continuations:
[user at host ~]$ file -rkim magic doc
doc:
-
-
[user at host ~]$
I think there should be a flag where if a rule's continuation doesn't
match, nothing in the entire tree is printed and it just moves on. This
file should just wind up as text/plain.
Please let me know if there's already an option for this.
- Colin Bartolome
More information about the File
mailing list