目录
命令:man的老大哥 info
man 是系统的手册分页程序
man命令大家都知道,也很熟悉就是说明书的意思,比-h 更详细。但是比man更详细的是info。
使用方法:info 命令名字 举例如下
[root@localhost ~]# info find
File: find.info, Node: Invoking find, Next: Invoking locate, Up: Reference8.1 Invoking 'find'
===================find [-H] [-L] [-P] [-D DEBUGOPTIONS] [-OLEVEL] [FILE...] [EXPRESSION]
'find' searches the directory tree rooted at each file name FILE by
evaluating the EXPRESSION on each file it finds in the tree.The command line may begin with the '-H', '-L', '-P', '-D' and '-O'
options. These are followed by a list of files or directories that
should be searched. If no files to search are specified, the current
directory ('.') is used.
比man更详细 但是 是英文的,对英文不好的小伙伴来说不错,可以提高英语水平。
命令:man的小弟 help
使用方法:help ls ,help只提供内置程序的,比如find命令就没有。
[root@localhost ~]# help help
help: help [-dms] [模式 ...]
显示内嵌命令的相关信息。
显示内嵌命令的简略信息。如果指定了 PATTERN 模式,
给出所有匹配 PATTERN 模式的命令的详细帮助,否则打
印一个帮助主题列表
下面代码块是实例:
[root@localhost ~]# help cd
cd: cd [-L|[-P [-e]]] [dir]
Change the shell working directory.
Change the current directory to DIR. The default DIR is the value of the
HOME shell variable.
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (/), then CDPATH is not used.
[root@localhost ~]# help ls
-bash: help: 没有与 `ls' 匹配的帮助主题。尝试 `help help' 或者 `man -k ls' 或者 `info ls'。
[root@localhost ~]#
连ls都没有,help这个命令不够help啊。。。。
总结,info 和man 很好用,info更自然语音,man更技术,格式化。help 可以不考虑使用。