mime.types - Online Linux Manual PageSection : 5
Updated : CUPS
Source : 2021-02-28
Note : OpenPrinting
NAMEmime.types − mime type description file for cups
DESCRIPTIONThe mime.types file defines the recognized file types. Additional file types are specified in files with the extension .types in the CUPS configuration directory. Each line in the mime.types 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: mime/type [ rule ... rule ]
Rules can be extended over multiple lines using the backslash character (: mime/type [ really-really-really-long-rule ...
rule ]
MIME media types specified by the mime/type field are case-insensitive and are sorted in ascending alphanumeric order for the purposes of matching. See the "TYPE MATCHING AND PRIORITY" section for more information. The rules may be grouped using parenthesis, joined using "+" for a logical AND, joined using "," or whitespace for a logical OR, and negated using "!".
RULESRules take two forms - a filename extension by itself and functions with test values inside parenthesis. The following functions are available: match("pattern") True if the filename matches the given shell wildcard pattern. ascii(offset,length) True if the length bytes starting at offset are valid printable ASCII (CR, NL, TAB, BS, 32-126). printable(offset,length) True if the length bytes starting at offset are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254). priority(number) 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. string(offset,"string") True if the bytes starting at offset are identical to string. istring(offset,"string") True if the bytes starting at offset match string without respect to case. char(offset,value) True if the byte at offset is identical to value. short(offset,value) True if the 16-bit big-endian integer at offset is identical to value. int(offset,value) True if the 32-bit big-endian integer at offset is identical to value. locale("string") True if current locale matches string. contains(offset,range,"string") True if the bytes starting at offset for range bytes contains string.
STRING CONSTANTSString constants can be specified inside quotes ("") for strings containing whitespace and angle brackets (<>) for hexadecimal strings.
TYPE MATCHING AND PRIORITYWhen CUPS needs to determine the MIME media type of a given file, it checks every MIME media type defined in the .types 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. For example, if two types "text/bar" and "text/foo" are defined as matching the extension "doc", normally the type "text/bar" will be chosen since its name is alphanumerically smaller than "text/foo". However, if "text/foo" also defines a higher priority than "text/bar", "text/foo" will be chosen instead.
FILES/etc/cups - Typical CUPS configuration directory.
EXAMPLESDefine two MIME media types for raster data, with one being a subset with higher priority: application/vnd.cups−raster string(0,"RaSt") string(0,"tSaR")
string(0,"RaS2") string(0,"2SaR")
string(0,"RaS3") string(0,"3SaR")
image/pwg-raster string(0,"RaS2") +
string(4,PwgRaster<00>) priority(150)
SEE ALSOcups-files.conf(5), cupsd.conf(5), cupsd(8), cupsfilter(8), mime.convs(5), CUPS Online Help (http://localhost:631/help)
COPYRIGHTCopyright © 2021-2022 by OpenPrinting. 0
Johanes Gumabo
Data Size : 17,522 byte
man-mime.types.5Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 202,895
Visitor ID : :
Visitor IP : 3.12.147.12 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.