Linux command
edit 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Edit a file
edit [filename]
Edit with explicit MIME type
edit [text/html]:[filename]
Show the editor command without running it
edit --norun [filename]
Using run-mailcap directly with the edit action
run-mailcap --action=edit [filename]
说明
edit is an alias for run-mailcap's edit action. It opens files in the appropriate editor based on MIME type configuration in mailcap files. The actual editor used depends on the file type and system mailcap configuration.
参数
- --debug
- Print extra diagnostic information about what is happening.
- --nopager
- Ignore any `copiousoutput` directive and send output directly to stdout.
- --norun
- Display the command that would be run without executing it.
FAQ
What is the edit command used for?
edit is an alias for run-mailcap's edit action. It opens files in the appropriate editor based on MIME type configuration in mailcap files. The actual editor used depends on the file type and system mailcap configuration.
How do I run a basic edit example?
Run `edit [filename]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --debug do in edit?
Print extra diagnostic information about what is happening.