file
gets its results from /etc/mime.types
.
From there:
application/mathematica-old
application/ms-tnef
application/msaccess mdb
application/msword doc dot
application/news-message-id
application/news-transmission
application/ocsp-request
application/ocsp-response
mimetype gets it from ...
ENVIRONMENT
XDG_DATA_HOME
XDG_DATA_DIRS
These variables can list base directories to search for data files.
The shared mime-info will be expected in the "mime" sub directory
of one of these directories. If these are not set, there will be
searched for the following directories:
$HOME/.local/share/mime
/usr/local/share/mime
/usr/share/mime
See also the "XDG Base Directory Specification"
http://freedesktop.org/Standards/basedir-spec
<http://freedesktop.org/Standards/basedir-spec>
Worth noting is this part in the man page for mimetype:
For naming switches I followed the manpage of file(1) version 4.02 when possible. They seem to differ completely from the spec in the 'utilities' chapter of IEEE Std 1003.1-2001 (POSIX).
So you might call it a bug against file /etc/mime.types
since vnd.ms-excel
is more accurate.