Mee*_*org 3 software-recommendation man
我一直想编写一个名为的 bash 实用程序realman,它可以像手册页中那样解释命令,但不是按命令所具有的选项按字母顺序排列命令,它只会给出普通用户需要的示例。
一些命令确实给出了示例,但由于手册页是由不同的人构建的,因此手册页的可读性没有中央控制。
以描述man为例
NAME
man - an interface to the on-line reference manuals
SYNOPSIS
man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-m system[,...]] [-M path] [-S list] [-e extension] [-i|-I] [--regex|--wildcard]
[--names-only] [-a] [-u] [--no-subpages] [-P pager] [-r prompt] [-7] [-E encoding] [--no-hyphenation] [--no-justification] [-p string] [-t] [-T[device]]
[-H[browser]] [-X[dpi]] [-Z] [[section] page ...] ...
man -k [apropos options] regexp ...
man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...
man -f [whatis options] page ...
man -l [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-P pager] [-r prompt] [-7] [-E encoding] [-p string] [-t] [-T[device]]
[-H[browser]] [-X[dpi]] [-Z] file ...
man -w|-W [-C file] [-d] [-D] page ...
man -c [-C file] [-d] [-D] page ...
man [-hV]
Run Code Online (Sandbox Code Playgroud)
这完全是矫枉过正。我的手册页会读...
Its a program gives you more details of a command.
eg. "man bash" would explain more about the command "bash"
Run Code Online (Sandbox Code Playgroud)
必须通读一个命令的所有选项才能找到大多数用户会使用的一个选项并不是很有建设性。
所以我的问题很简单,在 Ubuntu 中是否有一个“realman”类型的程序可以通过命令行使用,它更面向用户而不是面向系统管理员?
您要求的内容可能没有明确定义。并非每个命令都具有“大多数用户会使用的一个选项”。
但是,您说过,因为man您希望看到以下内容:
它的程序为您提供了命令的更多详细信息。
有关命令的类似信息,请使用whatis. 这总结了手册页。
ek@Kip:~$ whatis man
man (7) - macros to format man pages
man (1) - an interface to the on-line reference manuals
ek@Kip:~$ whatis whatis
whatis (1) - display manual page descriptions
ek@Kip:~$ whatis ls
ls (1) - list directory contents
LS (6) - display animations aimed to correct users who accident...
ek@Kip:~$ whatis ping
ping (8) - send ICMP ECHO_REQUEST to network hosts
Run Code Online (Sandbox Code Playgroud)
这仍然没有为您提供有关命令的命令行选项的任何信息(但同样,“这是一个为您提供更多命令详细信息的程序”)。
如果您需要中等数量的信息,最好的方法可能是在 Internet 上查找命令。你可以在网上搜索它,甚至维基百科。许多最著名和最常用的命令都有 Wikipedia 文章。例如,请参阅关于ls, man(关于一般联机帮助页,但包括man语法建议)grep、 和 的文章fsck。
如果您愿意,可以使用支持命令行模式的 Web 浏览器(例如links2),或仅命令行浏览器(如lynx
)。
最后,请注意 Ubuntu 中的许多命令行实用程序来自 GNU 项目,该项目提供了出色的文档。它通常比手册页更长、更详细,但您可能会发现它组织得更好。通常有描述性标题可以帮助您找到特定信息,根据我的经验,这比在许多联机帮助页中要容易得多。
GNU 手册可以在这里找到。(请记住,并非所有实用程序都是 GNU 实用程序。)许多最常用的命令不按名称出现,而是GNU coreutils 的一部分。GNU 手册可以在线查看,也可以以各种文件格式下载,其中一些非常适合在命令行上查看。
| 归档时间: |
|
| 查看次数: |
156 次 |
| 最近记录: |