{"id":4373,"date":"2022-12-20T17:49:06","date_gmt":"2022-12-20T20:49:06","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/mime-types-man5\/"},"modified":"2022-12-20T17:49:06","modified_gmt":"2022-12-20T20:49:06","slug":"mime-types-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/mime-types-man5\/","title":{"rendered":"mime.types (man5)"},"content":{"rendered":"<h1 align=\"center\">mime.types<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#COPYRIGHT\">COPYRIGHT<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">mime.types \u2212 mime type description file for cups<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>mime.types<\/b> file defines the recognized file types.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Additional file types are specified in files with the extension <i>.types<\/i> in the CUPS configuration directory.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Each line in the <b>mime.types<\/b> file is a comment, blank, or rule line. Comment lines start with the # character. Rule lines start with the MIME media type and are optionally followed by a series of file recognition rules:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>mime\/type<\/i> [ <i>rule<\/i> &#8230; <i>rule<\/i> ]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Rules can be extended over multiple lines using the backslash character ():<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>mime\/type<\/i> [ <i>really-really-really-long-rule<\/i> &#8230; <b><\/b> <i><br \/> rule<\/i> ]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">MIME media types specified by the <i>mime\/type<\/i> field are case-insensitive and are sorted in ascending alphanumeric order for the purposes of matching. See the &#8220;TYPE MATCHING AND PRIORITY&#8221; section for more information.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The rules may be grouped using parenthesis, joined using &#8220;+&#8221; for a logical AND, joined using &#8220;,&#8221; or whitespace for a logical OR, and negated using &#8220;!&#8221;.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>RULES<\/b> <br \/> Rules take two forms &#8211; a filename extension by itself and functions with test values inside parenthesis. The following functions are available: <b><br \/> match(&#8220;<\/b><i>pattern<\/i><b>&#8220;)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the filename matches the given shell wildcard <i>pattern<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>ascii(<\/b><i>offset<\/i><b>,<\/b><i>length<\/i><b>)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the <i>length<\/i> bytes starting at <i>offset<\/i> are valid printable ASCII (CR, NL, TAB, BS, 32-126).<\/p>\n<p style=\"margin-left:11%;\"><b>printable(<\/b><i>offset<\/i><b>,<\/b><i>length<\/i><b>)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the <i>length<\/i> bytes starting at <i>offset<\/i> are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254).<\/p>\n<p style=\"margin-left:11%;\"><b>priority(<\/b><i>number<\/i><b>)<\/b><\/p>\n<p style=\"margin-left:18%;\">Specifies the relative priority of this MIME media type. The default priority is 100. Larger values have higher priority while smaller values have lower priority.<\/p>\n<p style=\"margin-left:11%;\"><b>string(<\/b><i>offset<\/i><b>,&#8221;<\/b><i>string<\/i><b>&#8220;)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the bytes starting at <i>offset<\/i> are identical to <i>string<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>istring(<\/b><i>offset<\/i><b>,&#8221;<\/b><i>string<\/i><b>&#8220;)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the bytes starting at <i>offset<\/i> match <i>string<\/i> without respect to case.<\/p>\n<p style=\"margin-left:11%;\"><b>char(<\/b><i>offset<\/i><b>,<\/b><i>value<\/i><b>)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the byte at <i>offset<\/i> is identical to <i>value<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>short(<\/b><i>offset<\/i><b>,<\/b><i>value<\/i><b>)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the 16-bit big-endian integer at <i>offset<\/i> is identical to <i>value<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>int(<\/b><i>offset<\/i><b>,<\/b><i>value<\/i><b>)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the 32-bit big-endian integer at <i>offset<\/i> is identical to <i>value<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>locale(&#8220;<\/b><i>string<\/i><b>&#8220;)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if current locale matches <i>string<\/i>.<\/p>\n<p style=\"margin-left:11%;\"><b>contains(<\/b><i>offset<\/i><b>,<\/b><i>range<\/i><b>,&#8221;<\/b><i>string<\/i><b>&#8220;)<\/b><\/p>\n<p style=\"margin-left:18%;\">True if the bytes starting at <i>offset<\/i> for <i>range<\/i> bytes contains <i>string<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>STRING CONSTANTS<\/b> <br \/> String constants can be specified inside quotes (&#8220;&#8221;) for strings containing whitespace and angle brackets (<>) for hexadecimal strings.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>TYPE MATCHING AND PRIORITY<\/b> <br \/> When CUPS needs to determine the MIME media type of a given file, it checks every MIME media type defined in the <i>.types<\/i> files. When two or more types match a given file, the type chosen will depend on the type name and priority, with higher-priority types being used over lower-priority ones. If the types have the same priority, the type names are sorted alphanumerically in ascending order and the first type is chosen.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For example, if two types &#8220;text\/bar&#8221; and &#8220;text\/foo&#8221; are defined as matching the extension &#8220;doc&#8221;, normally the type &#8220;text\/bar&#8221; will be chosen since its name is alphanumerically smaller than &#8220;text\/foo&#8221;. However, if &#8220;text\/foo&#8221; also defines a higher priority than &#8220;text\/bar&#8221;, &#8220;text\/foo&#8221; will be chosen instead.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/cups<\/i> &#8211; Typical CUPS configuration directory.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Define two MIME media types for raster data, with one being a subset with higher priority:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">application\/vnd.cups\u2212raster string(0,&#8221;RaSt&#8221;) string(0,&#8221;tSaR&#8221;)  <br \/> string(0,&#8221;RaS2&#8243;) string(0,&#8221;2SaR&#8221;)  <br \/> string(0,&#8221;RaS3&#8243;) string(0,&#8221;3SaR&#8221;)<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">image\/pwg-raster string(0,&#8221;RaS2&#8243;) +  <br \/> string(4,PwgRaster<00>) priority(150)<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>cups-files.conf<\/b>(5), <b>cupsd.conf<\/b>(5), <b>cupsd<\/b>(8), <b>cupsfilter<\/b>(8), <b>mime.convs<\/b>(5), CUPS Online Help (http:\/\/localhost:631\/help)<\/p>\n<h2>COPYRIGHT <a name=\"COPYRIGHT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Copyright \u00a9 2007-2019 by Apple Inc.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  mime.types \u2212 mime type description file for cups <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1381],"class_list":["post-4373","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-mime"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4373"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4373\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}