如何在 Linux 中找到相关命令?

如何在 Linux 中找到相关命令?

例如,假设我正在尝试查找显示路由表(如route)或运行 a 的命令traceroute,但我实际上不知道完成此操作的命令。我的理解是我应该能够使用man -k [word],但它似乎永远不起作用:如果我man -k route在 Scientific Linux 6.1 上使用,我不会得到任何结果,即使我希望它返回任何包含“route”一词的内容!

不幸的是,当我寻找这个问题的答案时,人们find对文件搜索命令的解释让我感到困惑。

谢谢你!

答案1

该命令/usr/bin/mandb将在 Linux 上重建 man 数据库。这应该设置为 cronjob。在其他 Unix 上使用 comamnd catman -w

答案2

看一看apropos

runejuhl@lapaz:~$ apropos apropos 
apropos (1)          - search the manual page names and descriptions

从我的系统:

runejuhl@lapaz:~$ apropos route
ip-mroute (8)        - (unknown subject)
ip-route (8)         - (unknown subject)
lft (1)              - print the route packets trace to network host
lft.db (1)           - print the route packets trace to network host
NETLINK_ROUTE (7)    - Linux IPv4 routing socket
route (8)            - show / manipulate the IP routing table
routef (8)           - flush routes
routel (8)           - list routes with pretty output format
tcptraceroute (1)    - A traceroute implementation using TCP packets
tcptraceroute (8)    - print the route packets trace to network host
tcptraceroute.db (8) - print the route packets trace to network host
tcptraceroute.mt (1) - A traceroute implementation using TCP packets
traceproto (1)       - print the route packets trace to network host
traceproto.db (1)    - print the route packets trace to network host
traceroute (1)       - print the route packets trace to network host
traceroute-nanog (1) - print the route packets trace to network host
traceroute.db (1)    - print the route packets trace to network host
traceroute6 (1)      - print the route packets trace to network host
traceroute6.db (1)   - print the route packets trace to network host

相关内容