我在 VM 上最小安装了 CentOS 5.7 32 位。
apropos 命令总是返回“没有合适的”
[root@localhost ~]# apropos man
man: nothing appropriate
Run Code Online (Sandbox Code Playgroud)
即使在我运行updatedb之后。它适用于我拥有的另一台 CentOS 服务器。
当我使用的是不存在的命令,如开关lsof
和ps
有返回一个漫长的帮助菜单。而不是阅读整个事情,我希望能够为我正在寻找的开关grep它。我宁愿不使用两个命令。
这是我尝试 grep 时得到的结果:
ubuntu@ubuntu:~$ lsof -h | grep "\-U"
lsof 4.81
latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
usage: [-?abhlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]]
[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Defaults in parentheses; comma-separated set (s) items; dash-separated ranges.
-?|-h list help -a AND selections …
Run Code Online (Sandbox Code Playgroud)