MIME media types

Cara mengecek MIME type sebuah file di Linux. How to check MIME media types in Linux.

MIME stands for “Multipurpose Internet Mail Extensions. It’s a way of identifying files on the Internet according to their nature and format. For example, using the “Content-type” header value defined in a HTTP response, the browser can open the file with the proper extension/plugin. sumber

Format

file --mime-type -b FILENAME

Penggunaan

Contoh:

file --mime-type -b myfile.odt
application/vnd.oasis.opendocument.text

Contoh 2:

file --mime-type -b myphoto.png 
image/png

Contoh 3:

file --mime-type -b draft.mm 
application/x-freemind

Beda jenis file (file type), beda pula MIME type-nya.

Catatan ini ditulis sewaktu saya ingin membuat shortcut untuk Freemind. Saya tak tahu jenis MIME untuk file Freemind (.mm). Baca selengkapnya di sini.

Baca juga:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s