FOSSology  4.4.0
Open Source License Compliance by Open Source Software
MimeType agent

About mimetype agent

Lots of different agents generate mimetype information, but they have limitations.

For example:

  • Ununpack: it knows mimetypes! But only for the files it extracts. Unknown files are not assigned mimetypes.
  • Pkgagent: it knows mimetypes! But only for the files it supports. And the mimetypes are not the same as ununpack. For example, Ununpack uses Magic and says "application/x-rpm" while libextractor says "application/x-redhat-package-manager". These are different strings.

This agent is intended as be the official source for mimetypes.

What it does:

  1. If ununpack found a mimetype, use it. This is because ununpack actually unpacks the files. Thus, if the file can be unpacked then this must be the right mimetype. Also ununpack uses /etc/UnMagic.mime which identifies more special types than regular magic(5).
  2. If ununpack did not find a mimetype, then use magic(5).

Supported actions

Command line flag Description
-h Help (print this message), then exit
-i Initialize the database, then exit
-v Verbose (-vv = more verbose)
-c Specify the directory for the system configuration
-C Run from command line
-V Print the version info, then exit
file If files are listed, display their mimetype
no file Process data from the scheduler

Agent source