用过linux的朋友估计没有谁不熟悉man命令,大家都知道利用它可以查看到linux绝大部分命令的使用方法(但不是全部),除了这个你还了解它什么呢?其实了解man可以查看其它命令的使用方法就掌握了它的核心,但是最近看书的时候又找到了它的一点其他信息。哈哈,你就将这篇文章当做扯谈吧!~
1. man其实是manual的缩写(不会很多人认为它是"男人"吧),表示手册、指南的意思。
2. 其实man也包含8个部分。
man1: User programs
Manual pages that describe publicly accessible commands are contained
in this chapter. Most program documentation that a user will need to
use is located here.
man2: System calls
This section describes all of the system calls (requests for the kernel
to perform operations).
man3: Library functions and subroutines
Section 3 describes program library routines that are not direct calls
to kernel services. This and chapter 2 are only really of interest to
programmers.
man4: Special files
Section 4 describes the special files, related driver functions, and
networking support available in the system. Typically, this includes
the device files found in /dev and the kernel interface to networking
protocol support.
man5: File formats
The formats for many data files are documented in the section 5. This
includes various include files, program output files, and system files.
man6: Games
This chapter documents games, demos, and generally trivial programs.
Different people have various notions about how essential this is.
man7: Miscellaneous Manual pages that are difficult to classify are
designated as being section 7. The troff and other text processing
macro packages are found here.
man8: System administration Programs used by system administrators
for system operation and maintenance are documented here. Some of
these programs are also occasionally useful for normal users.
我们平常主要用到的是man1和man5,当我们敲出man命令时,默认的就是man1,例如man ls实际上等价的就是man 1 ls。这是最常用的,此时man会告诉我们这个命令(程序)的用法。而平常也偶尔会用到man5,比如你要查看/etc/fstab这个文件里面每一行每一列的的解释那么你就可以使用 man 5 fstab。那么你就可以得到相关解释信息。至于其他的man,估计很少会用到。
这些man的所对应的信息都是在/usr/share/man/这个目录下:
xxx@db-2:~$ ls /usr/share/man
cs de es fi fr gl hu id it ja ko man1 man2 man3 man4 man5 man6 man7 man8 nl pl pt pt_BR ru sv tr zh_CN zh_TW
其实每个manx的目录下的每个文件都是程序名或者称为命令名+x+.gz组成的,你解压之后可以看到里面是文本信息。另外,我们在man查看命令使用方法时,经常会看到第一行有command(数字),还有最后的SEE ALSO部分也是command(数字)这种信息,其实括号里面的信息就是表面你可以通过man 数字 command可以查看到相关信息,比如 man mkfs。
好了,扯谈完毕~
分享到:
相关推荐
中文Linux Man 文档 ac--输出用户连接时间 access--确定文件是否可以存取访问 ali--list mail aliases apm--查询高级电源管理(APM)BIOS apropos--search the whatis database for strings at-- ...
linuxman中文手册,绝对的神器!linux人必备手册!
Linuxman CHM 格式文件 Linux man 命令详细介绍 Linux学习好帮手 值得收藏的Linux命令速查手册
Linux中文man离线手册.chm
Linux中文man在线手册 Linux中文man在线手册 Linux中文man在线手册 Linux中文man在线手册
Linux man中文参考手册,涉及到Linux API和Linux命令所有的详细介绍。
Introduce the linux man page how to
Linux操作系统man手册中文版,手册不全
Linux man pages linux编程参考手册
转:This CHM is make from ManPages V3.32 by hhpt@163.com.
Linux 的 man 手册共有以下几个章节: 代号 代表內容 1 使用者在 shell 中可以操作的指令或可执行档 2 系統核心可呼叫的函数与工具等 3 一些常用的函数(function)与函数库(library),大部分是 C 的函数库(libc) 4 ...
原创作品! 搜索发现之前的Linux man 转换chm文档版本较老,很多链接不能用,而且不支持搜索功能,于是去下载了个最新的Linux manpages 然后制作成chm文件,资料更详尽!用来搜索Linux的API非常方便.
linux下man中文手册,对看英文头疼的同学应该很有帮助
在windows下直接查看,方便快捷,chm格式。
中文的离线帮助手册
包括linux中文man手册和英文man手册完整版!!!!!
linux的man手册PDF格式(不全).有open,read,write,close,fopen,fclose,fputs,fgets,termios等
这是继上一个版本linux man制作的加强版,信息量是上一版本的5倍,而且支持打开Linux头文件,是我目前正使用的版本,如果大家喜欢,下载量超100后,我将制作包含头文件搜索的版本。
linux ip 命令 man,linux ip 命令 man