Am Mittwoch, den 15.03.2006, 20:57 +0100 schrieb Gregor Zattler: > My local magic search path contains at least two *.mime > files. Thus at least the error message is misleading.
It doesn’t :-) Not in the way you think, at least. See below. > 0 pit:/tmp/file$ file -m ~/.mutt/.magic:/etc/magic:/usr/share/file/magic > -bi ms-word-file.doc > application/x-archive > [...] > 0 pit:/tmp/file$ file -m > ~/.magic:~/.mutt/.magic:/etc/magic:/usr/share/file/magic -bi ms-word-file.doc > application/msword > > [...] The only difference to the above command > lines is the prepended "~/.magic:" [...] Yes, but this difference has consequences. Just try both of these lines with an ‘echo’ in front of them: The tilde is not expanded by file, but by the shell, and only when it is the first element. > I think file should work without error when providing a > *search* path with at least ine existing *.mime file. The only *.mime file in one of the examples above was empty. Indeed file then issues an error message that is misleading, though one could argue that an empty file is not a ‘magic file’ at all. > It would be nice if file would identify MS Word files as > application/ms-word. I agree, but that is an entirely different problem. Note that the default magic.mime already has 13 entries for Word, but these files simply don’t have a proper magic. Bye, Mike -- |=| Michael Piefel |=| Member of the Debian project