2019-07-04 09:03:38 +01:00
|
|
|
# mimetype
|
|
|
|
|
|
|
|
> Automatically determine the MIME type of a file.
|
2021-08-16 11:34:01 +01:00
|
|
|
> More information: <https://manned.org/mimetype>.
|
2019-07-04 09:03:38 +01:00
|
|
|
|
|
|
|
- Print the MIME type of a given file:
|
|
|
|
|
|
|
|
`mimetype {{path/to/file}}`
|
|
|
|
|
|
|
|
- Display only the MIME type, and not the filename:
|
|
|
|
|
|
|
|
`mimetype --brief {{path/to/file}}`
|
|
|
|
|
|
|
|
- Display a description of the MIME type:
|
|
|
|
|
|
|
|
`mimetype --describe {{path/to/file}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Determine the MIME type of `stdin` (does not check a filename):
|
2019-07-04 09:03:38 +01:00
|
|
|
|
|
|
|
`{{some_command}} | mimetype --stdin`
|
|
|
|
|
|
|
|
- Display debug information about how the MIME type was determined:
|
|
|
|
|
|
|
|
`mimetype --debug {{path/to/file}}`
|
|
|
|
|
|
|
|
- Display all the possible MIME types of a given file in confidence order:
|
|
|
|
|
|
|
|
`mimetype --all {{path/to/file}}`
|
|
|
|
|
|
|
|
- Explicitly specify the 2-letter language code of the output:
|
|
|
|
|
|
|
|
`mimetype --language {{path/to/file}}`
|