linux帮助命令
help xxx :获取内部命令帮助
xxx --help :获取外部命令的帮助
] # cat --help #获取外部命令的帮助
] # 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.
………………省略部分输出信息………………
] # help -s cd #以短格式显示指定命令的帮助信息
cd : cd [-L|[-P [-e]] [-@]] [ dir ]
] # help -d cd #以简短格式显示指定命令的帮助信息
cd - Change the shell working directory.
] # help -m cd #以man命令格式显示指定命令的帮助信息
NAME
cd - Change the shell working directory.
SYNOPSIS
cd [-L|[-P [-e]] [-@]] [ dir ]
DESCRIPTION
Change the shell working directory.
Change the current directory to DIR. The default DIR is the value of the HOME shell variable.
………………省略部分输出信息………………
commands(普通的命令)
system calls(系统调用)
library calls(库函数)
special files(特殊文件:/dev下设备文件)
file formats and convertions(文件格式)
games for linux(游戏和娱乐)
macro packages and conventions(杂项)
system management commands(管理员命令)
其他(Linux特定, 用来存放内核例行程序的文档)
[root@linuxcool ~]# man ls
[root@linuxcool ~]# man 5 passwd
[root@linuxcool ~]# man -w ls
/usr/share/man/man1/ls.1.gz
[root@linuxcool ~]# man -w 5 passwd
/usr/share/man/man5/passwd.5.gz
注意:数字5表示帮助的类型,表示配置文件类型
]# man 1 cp
man 1 xxx —— 查询shell命令,查询用户命令
man 2 xxx —— 查询系统调用,API
man 3 xxx —— 查询库函数
man 4 xxx —— 查询设备文件和特殊文件
man 5 xxx —— 查询配置文件及格式
]# info ls #显示ls命令info文档的物理位置
]# info -w ls