在Linux系统上获取命令帮助信息和划分man文档
使用历史命令
history 打完以后前面会有顺序号的比如
1 cd
2 ls
3 pwd
如果需要重新执行cd命令则可以执行 !3 命令
命令补全功能 比如你要执行history命令 可以打上histo+键
命令帮助信息、man
man history
例如查 wait 这个命令,
[root@jcwkyl /]# man -k wait
部分输出如下:
wait (1p) - await process completion
wait (2) - wait for process to change state
wait (3p) - wait for a child process to stop or terminate
wait3 [wait4] (2) - wait for process to change state, BSD style
wait4 (2) - wait for process to change state, BSD style
wait [builtins ] (1) - bash built-in commands, see bash(1)
waitid (3p) - wait for a child process to change state
waitpid [wait] (2) - wait for process to change state
waitpid [wait] (3p) - wait for a child process to stop or terminate
上述命令 man –k 等同于 apropos 命令。会看到输出的第行分三部分,最中间的部分就表示这个命令在哪一类。例如:
wait (2) - wait for process to change state
就表示这个一个系统调用。因为分类 2 是系统调用的分类。
man 文档分为 9 大类 :
Section The human readable name
1 User commands that may be started by everyone.
2 System calls, that is, functions provided by the kernel.
3 Subroutines, that is, library functions.
4 Devices, that is, special files in the /dev directory.
5 File format descriptions, e.g. /etc/passwd .
6 Games, self-explanatory.
7 Miscellaneous, e.g. macro packages, conventions.
8 System administration tools that only root can execute.
9 Another (Linux specific) place for kernel routine documentation.
n (Deprecated) New documentation, that may be moved to a more appropriate section.
o (Deprecated) Old documentation, that may be kept for a grace period.
l (Deprecated) Local documentation referring to this particular system.
了解这些,在看一个命令的 man 文档的 see also 部分时就能猜到这个命令大概是哪一类的,是一个 bash 命令,还是一个系统调用,还是其它,等等,心里会有个数。
曾经自己在 linux 下写一个 socket 程序,因为记不太清楚 sockaddr_in 数据结构的定义,但是又 man 不到,最后在 linuxforum 论坛上找到了答案:应该用 man 7 ip 来看。
在Linux系统上获取命令帮助信息和划分man文档的更多相关文章
- Linux系统上的命令使用方法
许多windows非常熟悉ipconfig命令行工具,它被用来获取网络接口配置信息并对此进行修改.Linux系统拥有一个类似的工具,也就是ifconfig(interfaces config).通常需 ...
- Linux系统上使用php获取apk信息
最近在做一个apk商城,需要在用户上传了apk之后系统自动读取apk信息(包名,版本号等),后台语言使用的是php,需要php去调用系统的aapt命令去读取apk信息,在Linux系统上安装aapt的 ...
- Android中获取系统上安装的APP信息
Version:0.9 StartHTML:-1 EndHTML:-1 StartFragment:00000099 EndFragment:00003259 Android中获取系统上安装的APP信 ...
- linux系统上传下载命令rz和sz的教程
(一)安装方法汇总(注意:一下命令如果没有权限的需要在每个命令前面加一个sudo) 1.安装方法(推荐) sudo yum install lrzsz 2.在安装Linux系统时选中“DialupNe ...
- [r]Ubuntu Linux系统下apt-get命令详解
Ubuntu Linux系统下apt-get命令详解(via|via) 常用的APT命令参数: apt-cache search package 搜索包 apt-cache show package ...
- Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务
一.引言 今天本来没有打算写这篇文章,当初我感觉使用这个工具应该很简单,下载的过程也不复杂,也没有打算记录下来.但是在使用的过程中还是出现了一些问题,为了给第一次使用Redis Desktop Man ...
- 在Linux系统下mail命令的用法
在Linux系统下mail命令的测试 1. 最简单的一个例子: mail -s test admin@aispider.com 这条命令的结果是发一封标题为test的空信给后面的邮箱,如果你有mta并 ...
- Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务(转载6)
Redis进阶实践之六Redis Desktop Manager连接Windows和Linux系统上的Redis服务 一.引言 今天本来没有打算写这篇文章,但是,今天测试Redis的时候发现了两个问题 ...
- 深入学习Android系统上mount命令的使用
博客链接:http://blog.csdn.net/qq1084283172/article/details/52493227 在Android系统的预装apk病毒和elf病毒的清除时,经常需要先获取 ...
随机推荐
- 新概念英语(1-31)Where's Sally?
新概念英语(1-31)Where's Sally? Is the cat climbing the tree ? A:Where is Sally, Jack ? B:She is in the ga ...
- eclipse使用git及github学习笔记
项目托管 1.首先需要在github上建立一个远端仓库 点击Create repository后,会在github上建立相应的git仓库,并会出现如下界面: 复制https或者ssh的仓库地址,远端 ...
- python CSRF跨站请求伪造
python CSRF跨站请求伪造 <!DOCTYPE html> <html lang="en"> <head> <meta chars ...
- Hibernate(四):Hello World
下载hibernate开发包: 在本章之前需要继承hibernate开发插件到eclipse,详细操作请参考我的博文:<Hibernate(一):安装hibernate插件到eclipse环境& ...
- Item Pipeline
当Item在Spider中被收集之后,它将会被传递到Item Pipeline,一些组件会按照一定的顺序执行对Item的处理. 每个item pipeline组件(有时称之为"Item Pi ...
- jacascript DOM节点——节点内容
前言:这是笔者学习之后自己的理解与整理.如果有错误或者疑问的地方,请大家指正,我会持续更新! innerHTML 在读模式下,返回与调用元素的所有子节点(包括元素.注释和文本节点)对应的 HTML 标 ...
- React Native(十五)——RN中的分享功能
终于,终于,可以总结自己使用RN时的分享功能了-- 为什么呢?且听我慢慢道来吧: 从刚开始接触React Native(2017年9月中旬)就着手于分享功能,直到自己参与公司的rn项目开发中,再到现在 ...
- VirtualBox 局域网独立主机设置
网络地址转换(NAT)网卡用于分配虚拟机内网地址 桥接网卡用于分配母机内网地址 母机设置-网卡指定IP地址 常见坑有两个 坑1:记得把虚拟机防火墙关闭 坑2:虚拟机不可以ping主机,但母机可以pin ...
- springaop——AspectJ不可不知的细节
springaop简介 springaop是spring对AOP技术的具体实现,它是spring框架的核心技术.springaop底层使用JDK动态代理或CGLIB动态代理技术实现. 应用场景: 在多 ...
- Django REST framework+Vue 打造生鲜超市(十二)
十三.首页.商品数量.缓存和限速功能开发 13.1.轮播图接口实现 首先把pycharm环境改成本地的,vue中local_host也改成本地 (1)goods/serializer class B ...