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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通