mimetype
Automatically determine the MIME type of a file. tldr-pages
On Linux
Linux
Print the MIME type of a given file
mimetype path/to/fileIdentifyDisplay only the MIME type, and not the filename
mimetype --brief path/to/fileIdentifyDisplay a description of the MIME type
mimetype --describe path/to/fileIdentifyDetermine the MIME type of stdin (does not check a filename)
command | mimetype --stdinIdentifyDisplay debug information about how the MIME type was determined
mimetype --debug path/to/fileIdentifyDisplay all the possible MIME types of a given file in confidence order
mimetype --all path/to/fileIdentifyExplicitly specify the 2-letter language code of the output
mimetype --language path/to/fileIdentify