{
    "mode": "man",
    "parameter": "run-mailcap",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/run-mailcap/1/json",
    "generated": "2026-05-30T05:14:35Z",
    "synopsis": "run-mailcap --action=ACTION [--option[=value]] [MIME-TYPE:[ENCODING:]]FILE [...]\nThe see, edit, compose and print versions are just aliases that default to  the  view,  edit,\ncompose, and print actions (respectively).",
    "sections": {
        "NAME": {
            "content": "run-mailcap,  view,  see,  edit, compose, print - execute programs via entries in the mailcap\nfile\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "run-mailcap --action=ACTION [--option[=value]] [MIME-TYPE:[ENCODING:]]FILE [...]\n\nThe see, edit, compose and print versions are just aliases that default to  the  view,  edit,\ncompose, and print actions (respectively).\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "run-mailcap  (or any of its aliases) will use the given action to process each mime-type/file\nin turn.  Each file is specified as its mime-type, its encoding (e.g. compression), and file‐\nname together, separated by colons.  If the mime-type is omitted, an attempt to determine the\ntype is made by trying to match the file's extension with those in the mime.types files.   If\nno mime-type is found, a last attempt will be done by running the file command, if available.\nIf the encoding is omitted, it will also be determined from the file's extensions.  Currently\nsupported encodings are gzip (.gz), bzip2 (.bz2), xz (.xz), and compress (.Z).  A filename of\n\"-\" can be used to mean \"standard input\", but then a mime-type must be specified.\n\nBoth the user's  files  (~/.mailcap;  ~/.mime.types)  and  the  system  files  (/etc/mailcap;\n/etc/mime.types) are searched in turn for information.\n\nEXAMPLES\nsee picture.jpg\nprint output.ps.gz\ncompose text/html:index.htm\nextract-mail-attachment msg.txt | see image/tiff:gzip:-\n\nOPTIONS\nAll options are in the form --<opt>=<value>.\n",
            "subsections": [
                {
                    "name": "--action=<action>",
                    "content": "Performs  the  specified  action on the files.  Valid actions are view, cat (uses only\n\"copiousoutput\" rules and sends output to STDOUT) , compose,  composetyped,  edit  and\nprint.   If  no  action is specified, the action will be determined by how the program\nwas called.\n",
                    "long": "--action",
                    "arg": "<action>"
                },
                {
                    "name": "--debug",
                    "content": "Turns on extra information to find out what is happening.\n",
                    "long": "--debug"
                },
                {
                    "name": "--nopager",
                    "content": "Ignores any \"copiousoutput\" directive and sends output to STDOUT.\n",
                    "long": "--nopager"
                },
                {
                    "name": "--norun",
                    "content": "Displays the found command without actually executing it.\n",
                    "long": "--norun"
                }
            ]
        },
        "SECURITY": {
            "content": "A temporary symbolic link to the file is opened if the file name matches the Perl regular ex‐\npression \"[^[:alnum:],.:/@%^+=-]\", in order to protect from the injection of shell commands,\nand to make sure that the name can always be displayed in the current locale.   In  addition,\nthe  file  is  opened  using its absolute path to prevent the injection of command-line argu‐\nments, for instance using file names starting with dashes.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "file(1) mailcap(5) mailcap.order(5) update-mime(8)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "run-mailcap (and its aliases) was written by Brian White <bcwhite@pobox.com>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "run-mailcap (and its aliases) is in the public domain (the only true \"free\").\n\n\n\nDebian Project                              1st Jan 2008                              RUN-MAILCAP(1)",
            "subsections": []
        }
    },
    "summary": "run-mailcap,  view,  see,  edit, compose, print - execute programs via entries in the mailcap file",
    "flags": [
        {
            "flag": "",
            "long": "--action",
            "arg": "<action>",
            "description": "Performs the specified action on the files. Valid actions are view, cat (uses only \"copiousoutput\" rules and sends output to STDOUT) , compose, composetyped, edit and print. If no action is specified, the action will be determined by how the program was called."
        },
        {
            "flag": "",
            "long": "--debug",
            "arg": null,
            "description": "Turns on extra information to find out what is happening."
        },
        {
            "flag": "",
            "long": "--nopager",
            "arg": null,
            "description": "Ignores any \"copiousoutput\" directive and sends output to STDOUT."
        },
        {
            "flag": "",
            "long": "--norun",
            "arg": null,
            "description": "Displays the found command without actually executing it."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "file",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/file/1/json"
        },
        {
            "name": "mailcap",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mailcap/5/json"
        },
        {
            "name": "mailcap.order",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mailcap.order/5/json"
        },
        {
            "name": "update-mime",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/update-mime/8/json"
        }
    ]
}