在linux下获取帮助
1.使用man手册页
man是一种显示Unix/Linux在线手册的命令。可以用来查看命令、函数或文件的帮助手册,另外它还可以显示一些gzip压缩格式的文件。
读者在遇到不懂的命令时,可以用man查看这个命令;写程序时有不会用的函数时,可以用man查看这个函数;有不懂得文件时,也可以用man查看文件。一般情况下man手册页的资源主要位于/usr/share/man目录下,使用如下命令显示。
[root@redhat2 ~]# ls /usr/share/man
bg en hu man0p man2x man4x man7 man9x pt sl
cs es id man1 man3 man5 man7x mann pt_BR sv
da fi it man1p man3p man5x man8 nl ro tr
de fr ja man1x man3x man6 man8x overrides ru zh_CN
el hr ko man2 man4 man6x man9 pl sk zh_TW
[root@redhat2 ~]#
通常使用者只要在命令MAN后,输入想要获取的命令的名称(例如ls),MAN就会列出一份完整的说明,其内容包括命令语法、各选项的意义及相关命令等。
[root@redhat2 ~]# man ls
LS(1) User Commands LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options
too.
-a, --all
do not ignore entries starting with .
-A, --almost-all
do not list implied . and ..
--author
with -l, print the author of each file
-b, --escape
Linux提供了丰富的帮助手册,当你需要查看某个命令的参数时不必到处上网查找,只要man一下即可。
Linux的man手册共有以下几个章节:
|
代號 |
代表內容 |
|
1 |
使用者在shell中可以操作的指令或可执行档 |
|
2 |
系統核心可呼叫的函数与工具等 |
|
3 |
一些常用的函数(function)与函数库(library),大部分是C的函数库(libc) |
|
4 |
装置档案的说明,通常在/dev下的档案 |
|
5 |
设定档或者是某些档案的格式 |
|
6 |
游戏(games) |
|
7 |
惯例与协定等,例如Linux档案系统、网络协定、ASCII code等等的說明 |
|
8 |
系統管理員可用的管理指令 |
|
9 |
跟kernel有关的文件 |
如:man 5 data
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
1、Standard commands (标准命令)
2、System calls (系统调用)
3、Library functions (库函数)
4、Special devices (设备说明)
5、File formats (文件格式)
6、Games and toys (游戏和娱乐)
7、Miscellaneous (杂项)
8、Administrative Commands (管理员命令)
9 其他(Linux特定的), 用来存放内核例行程序的文档。
n 新文档, 可能要移到更适合的领域。
o 老文档, 可能会在一段期限内保留。
l 本地文档, 与本特定系统有关的。
例如:我们输入 man ls,它会在最左上角显示“LS(1)”,在这里,“LS”表示手册名称,而“(1)”表示该手册位于第一节章,同样,我们输入“man ifconfig”它会在最左上角显示“IFCONFIG(8)”。也可以这样输入命令:“man [章节号] 手册名称”。
man是按照手册的章节号的顺序进行搜索的,比如:
man sleep
只会显示sleep命令的手册,如果想查看库函数sleep,就要输入:
man 3 sleep
在linux下获取帮助的更多相关文章
- Linux 下获取LAN中指定IP的网卡的MAC(物理地址)
// all.h// 2005/06/20,a.m. wenxy #ifndef _ALL_H#define _ALL_H #include <memory.h>#include < ...
- Linux下获取硬盘使用情况
Linux下获取硬盘使用情况[总结] 1.前言 在嵌入式设备中,硬盘空间非常有限,在涉及到经常写日志的进程时候,需要考虑日志的大小和删除,不然很快就硬盘写满,导致日志程序崩溃.为了捕获硬盘写满的异常场 ...
- .net core在Linux下获取AD域信息
.net core在Linux下获取AD域信息 .net Core 2.1.4 .net core现在System.DirectoryServices只支持Windows平台下使用. 参考: http ...
- Linux下获取和设置IP
在Linux下获取关于IP和网关的操作:重点是对struct ifreq 的操作. 那么进入目录/usr/include/net/if.h下看查找struct ifreq结构体. /* Interfa ...
- window/linux下获取文件MD5
MD5消息摘要算法(英语: MD5 Message-Digest Algorithm), 主要用于确保信息传输过程的一致性校验. 首先介绍两个工具: window: WinMD5Free Linu ...
- Linux下获取本机IP地址的代码
Linux下获取本机IP地址的代码,返回值即为互联网标准点分格式的字符串. #define ETH_NAME "eth0" //获得本机IP地址 char* GetLocalAdd ...
- linux下获取占用CPU资源最多的10个进程
linux下获取占用CPU资源最多的10个进程,可以使用如下命令组合: ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head linux下获取占用 ...
- Linux下获取arm的交叉编译工具链
转载请注明文章:Linux下获取arm的交叉编译工具链 出处:多客博图 这里介绍,Linux下获取arm的交叉编译工具链,比如arm-linux-gnueabihf-gcc.arm-linux-gne ...
- 在Windows及Linux下获取毫秒级运行时间的方法
在Windows下获取毫秒级运行时间的方法 头文件:<Windows.h> 函数原型: /*获取时钟频率,保存在结构LARGE_INTEGER中***/ WINBASEAPI BOOL W ...
- linux下获取软件源码包 centos/redhat, debian/ubuntu
linux下获取软件源码包 centos/redhat, debian/ubuntu centos下: 1. yum install yum-utils 主要为了获取yumdownloader 2. ...
随机推荐
- 如何重新安装DEDECMS织梦系统
重装的方法: 1.找到安装目录\install\index.php.bak文件,改名为index.php: 2.删除安装目录\install\install_lock文件:
- 6、httpd服务的安装、配置
.本地yum源安装httpd服务 (必须是已搭建好本地yum源) yum install httpd -y (安装httpd) 2.systemctl restart httpd.service ...
- Qt msgBox 快捷版
使用 int iRet = msgBox(pos, tr("警告") , tr("确定要删除当前选中的行吗?") , tr(, ); == iRet) retu ...
- C#—WebService
一.qq是否在线 1.添加Web引用 qqOnlineWebService cn.com.webxml.www.qqOnlineWebService shelly1 = new NIIT1109 ...
- HyperV上的Linux虚拟机启动报panic_early_exception错误
在Windows Server 2012服务器上的HyperV安装的Oracle Linux 6.4版本,在增加内存容量后(有16G升至30G),操作系统无法启动.黑屏并报"PANIC: e ...
- ios学习之路
整合网络资源和自己的实际经验,表述于此. 1 Xcode详解 非常实用的xcode介绍,详情请见外部链接http://demo.netfoucs.com/shulianghan/article/det ...
- [Debian]8.2升8.3
$ uname -mrs $ lsb_release -a $ sudo apt-get update#開始升級 $ sudo apt-get dist-upgrade $ sudo reboot#重 ...
- MySQL安装及主从配置
系统环境:CentOS release 6.5 (Final)(最小化安装) MySQL版本:mysql-5.6.12 Cmake版本:cmake-2.8.4 说明:安装mysql先安装cmake(原 ...
- 综合使用union和limit区分结果并限制返回结果集的条数
limit , 这里的limit限制了返回的union(合并)后的结果集,
- docvalues和Fieldcache
Fieldcache: docID->document->fieldvalue 无论是聚类排序关联等,首先都需要获得文档中某个字段的值,通过docID去获得整个document,然后再去 ...