1、help
功能: 用于显示 shell 内部命令的帮助信息。
语法格式: help [-dms] [pattern …]
常用参数:
参数 | 作用 |
---|---|
-d | 显示内部命令的简要描述。 |
-m | 按照 man 手册的格式输出内部命令的帮助信息。 |
-s | 仅输出内部命令的命令格式。 |
示例:
- 显示所有内部命令。
[yinxd@localhost ~]$ help
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
A star (*) next to a name means that the command is disabled.
job_spec [&] history [-c] [-d offset] [n] or history -anrw [filename>
(( expression )) if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMA>
. filename [arguments] jobs [-lnprs] [jobspec ...] or jobs -x command [args]
: kill [-s sigspec | -n signum | -sigspec] pid | jobspec >
[ arg... ] let arg [arg ...]
[[ expression ]] local [option] name[=value] ...
----以下省略----
- 显示
help
命令的帮助信息。
[yinxd@localhost ~]$ help help
help: help [-dms] [pattern ...]
Display information about builtin commands.
Displays brief summaries of builtin commands. If PATTERN is
specified, gives detailed help on all commands matching PATTERN,
otherwise the list of help topics is printed.
Options:
-d output short description for each topic
-m display usage in pseudo-manpage format
-s output only a short usage synopsis for each topic matching
PATTERN
Arguments:
PATTERN Pattern specifiying a help topic
Exit Status:
Returns success unless PATTERN is not found or an invalid option is given.
- 显示
help
命令的简要描述。
[yinxd@localhost ~]$ help -d help
help - Display information about builtin commands.
- 显