linux man用法
2012-09-17 16:26
197 查看
Linux man命令是初学者必须要掌握的一个Linux重要命令,这个命令可以帮助在学习中遇到的各种不会使用的命令问题,每个命令的不同的使用方法都可以在这里查找的到。现在介绍具体使用方法。
在Linux的shell下我经常要使用man命令来查看一些不熟悉的命令的使用方法。最经在shell下编程的时候,发现一些c和c++中的库函数不清楚,我都跑去网上搜索了。一不小心,我发现,原来man还可以用来查询系统库文件中的一些函数定义和使用方法。
man就是manual的缩写,用来查看系统中自带的各种参考手册,但是手册页分为好几个部分,如下所示:
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
在shell中输入 man+数字+命令/函数 即可以查到相关的命令和函数。若不加数字,那man命令默认从数字较小的手册中寻找相关命令和函数。
例如,本来是想寻找c标准库中的rand()函数,直接使用man rand得到的是一个rand命令的手册,直接用来产生一个随机数,这个内容在手册section 1中。如果使用man 3 rand就可以得到自己想要的库函数中rand()的用法了。
这就Linux man命令的使用技巧描述到这里。
在Linux的shell下我经常要使用man命令来查看一些不熟悉的命令的使用方法。最经在shell下编程的时候,发现一些c和c++中的库函数不清楚,我都跑去网上搜索了。一不小心,我发现,原来man还可以用来查询系统库文件中的一些函数定义和使用方法。
man就是manual的缩写,用来查看系统中自带的各种参考手册,但是手册页分为好几个部分,如下所示:
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
在shell中输入 man+数字+命令/函数 即可以查到相关的命令和函数。若不加数字,那man命令默认从数字较小的手册中寻找相关命令和函数。
例如,本来是想寻找c标准库中的rand()函数,直接使用man rand得到的是一个rand命令的手册,直接用来产生一个随机数,这个内容在手册section 1中。如果使用man 3 rand就可以得到自己想要的库函数中rand()的用法了。
这就Linux man命令的使用技巧描述到这里。
相关文章推荐
- linux 下man的用法
- Linux帮助查看man用法详解
- linux 指令 man的用法
- man命令_Linux man 命令用法详解:查看Linux中的指令帮助
- Linux中man 用法
- linux man的用法
- Linux的基本概念及man,date,ls常见用法
- [转载] linux man 手册各个章节的意义和用法
- 3.linux C 用man查各种函数的用法
- linux下使用man查看C函数用法
- Linux下man手册的用法
- linux中man用法(转)
- linux man 手册各个章节的意义和用法zz
- linux man 手册各个章节的意义和用法
- linux中man用法
- linux之man命令用法入门
- Linux帮助查看man用法详解
- 文档总结3-Linux中man命令详解与用法
- linux C man的用法
- linux中man用法