[Linux命令] man命令
man命令查看系统帮助手册(manual)
基本的用法:
$ man lsLS(1) User Commands LS(1)NAMEls - list directory contentsSYNOPSISls [OPTION]... [FILE]...DESCRIPTIONList information about the FILEs (the current directory by default).
操作说明:
执行man命令后,进入man操作界面,显示查询命令的帮助内容。
在这个界面下操作方式:
1)q键,退出man命令。
2)方向键、page-up、page-down上下翻页。
3)'/'进入搜索模式,输入关键字或者正则表达式。
用关键字查询
列出包含关键字“printf”相关的帮助。
每项括号中的数字是man章节(section)号。
$ man -k printf
asprintf (3) - print to allocated string
caca_conio_cprintf (3caca) - The libcaca public header.
caca_conio_printf (3caca) - The libcaca public header.
caca_printf (3caca) - (unknown subject)
caca_vprintf (3caca) - (unknown subject)
dprintf (3) - formatted output conversion
fprintf (3) - formatted output conversion
fwprintf (3) - formatted wide-character output conversion
printf (1) - format and print data
printf (3) - formatted output conversion
snprintf (3) - formatted output conversion
sprintf (3) - formatted output conversion
swprintf (3) - formatted wide-character output conversion
vasprintf (3) - print to allocated string
vdprintf (3) - formatted output conversion
vfprintf (3) - formatted output conversion
vfwprintf (3) - formatted wide-character output conversion
vprintf (3) - formatted output conversion
vsnprintf (3) - formatted output conversion
vsprintf (3) - formatted output conversion
vswprintf (3) - formatted wide-character output conversion
vwprintf (3) - formatted wide-character output conversion
wprintf (3) - formatted wide-character output conversion
man section
分类说明
帮助内容分了几个大类,即section。分类如下:
shell 命令 1 Executable programs or shell commands
Linux系统接口函数 2 System calls (functions provided by the kernel)
C语言库函数 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]
大部分情况下,不需要指定section,前提是没有重复。例如上面的例子中,看ls帮助直接查阅就可以。
当不同类别中有重复的内容时,就需要指定section。例如上面查询关键字‘printf’,结果中可以看到2个完全一样的同名帮助项。第一个是shell命令中的printf,第二个是系统接口(C函数库)的printf。
printf (1) - format and print data
printf (3) - formatted output conversion
不指定section
不指定section就默认显示最小section编号中对应的命令。
如果只输入’man printf’,会显示shell中的printf命令(section号更小):
$ man printfPRINTF(1) User Commands PRINTF(1)NAMEprintf - format and print dataSYNOPSISprintf FORMAT [ARGUMENT]...printf OPTION
指定section
通过指定section,可以查看特定的手册页:
以下2中方式效果相同,都是指定在section 3中,查询printf。
$ man printf.3
$ man 3 printf
PRINTF(3) Linux Programmer's Manual PRINTF(3)NAMEprintf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf, vsprintf, vsnprintf - formatted out‐put conversion
这是比较常用的一些功能,更细节的功能请查阅:
$ man man
[Linux命令] man命令相关推荐
- linux下find命令的使用和总结
背景:find命令十分的好用,特别是在查找文件的时候,这个时候需要和文件通配符一起使用. 1 前言 我们为什么要学会使用find命令? 每一种操作系统都有成千上万的文件组成,对于linux这样&quo ...
- linux 判断某个命令是否安装
linux 判断某个命令是否安装 if ! [ -x "$(command -v git)" ]; thenecho 'Error: git is not installed.' ...
- linux 命令删除命令,Linux 命令之删除命令
在Linux下删除文件用rm命令,具体用法如下: rm [选项] 文件 选项说明: -f -force 忽略不存在的文件,强制删除,无任何提示 -i --interactive 进行交互式地删除 -r ...
- linux下比较文件并输出,Linux使用diff命令比较文件找出文件之间相同的部分
如果你需要比较系统文件的内容,那么你就会是使用到diff命令,可找出文件之间相同的部分,下面小编就给大家详细介绍下Linux diff命令的用法. diff 命令是 linux上非常重要的工具,用于比 ...
- Linux的watch命令--实时监测命令的运行结果
watch 是一个非常实用的命令,基本所有的 Linux 发行版都带有这个小工具,如同名字一样,watch 可以帮你监测一个命令的运行结果,省得你一遍遍的手动运行.直接在 watch 后面接你想运行的 ...
- linux 文件查找命令集:find,locate,wheres,which,type
文章目录 前言 find命令 命令格式: 常用选项: 举例使用 locate命令 命令格式 使用实例 whereis命令 使用过程: which命令 type命令 前言 在linux系统中一切皆文件, ...
- linux的strace命令
linux的strace命令 strace 命令是一种强大的工具,它能够显示所有由用户空间程序发出的系统调用. strace 显示这些调用的参数并返回符号形式的值.strace 从内核接收信息,而且不 ...
- Linux下addr2line命令用法
Linux下addr2line命令用于将程序指令地址转换为所对应的函数名.以及函数所在的源文件名和行号.当含有调试信息(-g)的执行程序出现crash时(core dumped),可使用addr2li ...
- Linux查看WAS的jvm信息,linux 下使用命令查看jvm信息
java程序员除了编写业务代码之外,特别是项目上线之后,更需要关注的是系统的性能表现,这个时候就需要了解一下jvm的性能表现了,可以借助于java虚拟机自带的一些分析工具,主要有三个常用的命令. 1. ...
- linux那个11命令是什么意思,11个有用的Linux命令
11个有用的Linux命令,命令,代码,文件,行号,文件夹 11个有用的Linux命令 易采站长站,站长之家为您整理了11个有用的Linux命令的相关内容. Linux命令行吸引了大多数Linux爱好 ...
最新文章
- JavaScript 高级篇之DOM文档,简单封装及调用、动态添加、删除样式(推荐七)
- DDNS 的工作原理及其在 Linux 上的实现--转
- 无废话ADO.NET 第二章 关于连接
- 阿里云linux服务器初步使用
- maf中anglearc_Oracle MAF中的LOV
- 通过OpenShift超越云技术
- 存储路径_KUKA C4机器人通过KRC CONFIGURATEOR设置存储路径
- Atitit.加密算法 des aes 各个语言不同的原理与解决方案java php c#
- javascript无限弹窗_解决下javascript无限弹窗的问题
- 二进制与十六进制的转换
- 敏捷模式下携程的接口自动化平台演变
- android 测光模式,Android摄像头:设置测光点位置
- 企业如何操作网络口碑营销?
- 微信投票软件制作代码
- 计算机管理磁盘管理,windows7双磁盘管理图文教程
- 实验11-1-7 藏头诗 (15分)
- word2013图表题注:将图一-1改为图1-1
- kaldi中hashlist阅读总结
- 【VBA编程】Sub过程
- 若依前后端分离框架学习-2:登录过程
热门文章
- CSS实现溢出显示省略号
- Bootstrap(全局CSS之表单按钮图片辅助类响应式工具)
- 华为/华三交换机用lldb命令快速查看邻居交换机
- 才智汇栖霞,菁英聚智谷——中国(南京)智谷“AI+生物医药”菁英论坛启幕
- JS中的原型和原型链(图解)
- PTA - 黑洞数(陷阱数、数字黑洞、Kaprekar问题)
- 统计学中z分布、t分布、F分布及χ^2分布
- 成功解决You are using pip version 9.0.1, however version 9.0.3 is available. You should consider upgrad
- linux怎么修改sftp默认端口,CentOS 6.5/6.6修改SSH默认端口号
- 通信原理樊信昌_通信原理樊信昌第五章课后答案