Searching, googling, I could not find any information about file types recognized by file
.
For example, an *.mp4 file is identified as "ISO Media" (while being able to play with VLC normally). This is not 100% clear, it somehow leaves me to wonder whether it's a correct detection or the file is confused for ISO image. (Either because e.g. the sample is somehow corrupted, or, just that the algorithm is not 100% accurate for all types.)
My problem is that I need to set up some rules for switching based on file type. I have set created a sample file set, but I cannot collect enough samples of all types which I need to be recognized by my code. And the real set will probably be really huge.
It would be enough for me if I could read some comments to use as a reference to those types which are not so obvious. But to my surprise, I could not find any useful information. Most of my searches ended on magic file format specification, which is not really helpful to me. I'm interested in the magic file which is distributed with, say, Debian.
file --mime-type
?file
.file --mime
is tempting (has way nicer output), but unfortunately it's not option for me as it does not recognize e.g. PE32 executable. (Thanks though, for "forcing me" to try it, maybe a combination of these methods will come handy in future.)