← 返回命令列表

Linux command

run-mailcap 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

View

run-mailcap --action=view [path/to/file]

Edit

run-mailcap --action=edit [path/to/file]

Print

run-mailcap --action=print [path/to/file]

Cat

run-mailcap --action=cat [path/to/file]

Example

run-mailcap --action=view --debug [path/to/file]

Display command

run-mailcap --action=view --norun [path/to/file]

说明

run-mailcap executes programs via entries in the mailcap file based on MIME types. It selects appropriate handlers for viewing, editing, printing, or composing files. The mailcap database maps MIME types to applications, enabling automatic file handling based on content type. The commands see, edit, compose, and print are aliases that default to the view, edit, compose, and print actions respectively.

参数

--action=_action_
Action to perform: view, cat, compose, composetyped, edit, print. The cat action uses only copiousoutput rules and sends output to stdout.
--debug
Display diagnostic output for troubleshooting
--nopager
Ignore copiousoutput directive and send output directly to stdout
--norun
Display the command that would be executed without running it

FAQ

What is the run-mailcap command used for?

run-mailcap executes programs via entries in the mailcap file based on MIME types. It selects appropriate handlers for viewing, editing, printing, or composing files. The mailcap database maps MIME types to applications, enabling automatic file handling based on content type. The commands see, edit, compose, and print are aliases that default to the view, edit, compose, and print actions respectively.

How do I run a basic run-mailcap example?

Run `run-mailcap --action=view [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --action=_action_ do in run-mailcap?

Action to perform: view, cat, compose, composetyped, edit, print. The cat action uses only copiousoutput rules and sends output to stdout.