Linux的man很强大,该手册分成很多section,使用man时可以指定不同的section来浏览,各个section意义如下:

1 - commands
2 - system calls
3 - library calls
4 - special files
5 - file formats and convertions
6 - games for linux
7 - macro packages and conventions
8 - system management commands
9 - 其他

其中:
1是普通的命令
2是系统调用,如open,write之类的
3是库函数,如printf,fread
4是特殊文件,也就是/dev下的各种设备文件
5是指文件的格式,比如passwd, 就会说明这个文件中各个字段的含义
6是给游戏留的,由各个游戏自己定义
7是附件还有一些变量,比如向environ这种全局变量在这里就有说明
8是系统管理用的命令,这些命令只能由root使用,如ifconfig

使用手册方式举例:
man 1 ls         #查看第一章中的ls命令帮助
man 3 printf     #查看库函数printf帮助

Set colors for man pages:

设置方法比较简单,打开/etc/bash.bashrc(需要root权限)或者~/.bashrc文件加入如下内容:

# Set colors for man pages
man() {
env \
LESS_TERMCAP_mb=$(printf “\e[1;31m”) \
LESS_TERMCAP_md=$(printf “\e[1;31m”) \
LESS_TERMCAP_me=$(printf “\e[0m”) \
LESS_TERMCAP_se=$(printf “\e[0m”) \
LESS_TERMCAP_so=$(printf “\e[1;44;33m”) \
LESS_TERMCAP_ue=$(printf “\e[0m”) \
LESS_TERMCAP_us=$(printf “\e[1;32m”) \
man “$@”
}

重新打开终端,现在执行man就有颜色了。

该脚本其实定义了一个man函数,每次我们执行man的时候都是执行的该函数。

如果执行原始的man运行/usr/bin/man 即可。

EG:

[root@server1 test1]# gunzip -c ifconfig.8.gz > ./ifconfig.man
[root@server1 test1]# man2html ifconfig.man >ifconfig.html

脚本:
从linux的man中提取html格式文件做成chm电子书
#!/bin/bash #This is a manual transform script #it will transform all manuals to htmls MAN2HTML=/usr/bin/man2html
MANPATH=/home/tt/man/man
GZ=/bin/gzip
TargetHtmlPath=/home/tt/pp NUM=
function createhtml()
{
for (( i=; i<=NUM; i++ ));
do
dir="${MANPATH}${i}" ##get target path if [ -d $dir ]
then
(
cd $dir
${GZ} -dvf *.gz && ${MAN2HTML} ".*${i}"
for file in *
do
if [ -f $file ]
then
${MAN2HTML} $file >"${file}.html"
fi
done
)
fi dir2="${MANPATH}${i}p" ##get target path if [ -d $dir2 ]
then
echo $dir2
(
cd $dir2 && ${GZ} -dvf *.gz && ${MAN2HTML} ".*${i}"
for file in *
do
if [ -f $file ]
then
${MAN2HTML} $file >"${file}.html"
fi
done
)
fi
done
} function copyhtml()
{
for (( i=; i<=NUM; i++ ));
do
dir="${MANPATH}${i}" ##get target path if [ -d $dir ]
then
(
cd $dir
pwd
#cp *.html ${TargetHtmlPath} -v for file in *.html
do
cp ${file} ${TargetHtmlPath} -v
done
)
fi dir2="${MANPATH}${i}p" ##get target path if [ -d dir2 ];
then
(
cd $dir2
pwd
#cp *.html ${TargetHtmlPath} -v for file in *.html
do
cp ${file} ${TargetHtmlPath} -v
done
)
fi
done
} #createhtml copyhtml

把linux的man手册转化为windows下可读的格式:

 
man ls >ls.txt
但是从Linux系统里传到windows里无法正常查看。
解决方法:
man ls | col -b >ls.txt

格式:man command_name | col -b >command_name.txt

感觉不方便也可以制作成pdf电子书

格式如下:man -t command_name | ps2pdf ->command_name.pdf

http://www.kerneltravel.net/?page_id=5   LINUX 内核

http://www.dit.upm.es/~jmseyas/linux/kernel/hackers-docs.html   online document book about linux kernerl

https://lwn.net/Articles/648154/     :Adding Processor Trace support to Linux

http://halobates.de/blog/

http://kernelplanet.org/   LINUX 内核站点

https://www.kernel.org/doc/  LINUX 内核文档

https://github.com/tinyclub/linux-doc

Linux内核源码自带了很多很优秀的文档信息,那么这些文档的大概阅读顺序是什么呢?

http://lxr.linux.no/linux+v2.6.36/是一个在线阅读Linux内核源码的好地方)

第一部分:学会安装使用Linux内核、GPL规范和怎样与Linux内核维护者联系

1、README(http://lxr.linux.no/linux+v2.6.36/README),它的内容包括以下几部分:什么是Linux、运行的硬件环境、怎样安装和升级Linux内核源码、

编译Linux内核所需要的最小软件工具集合、怎样编译内核、怎样使用和引导新内核以及遇到问题时怎样处理等。

2、COPYING(http://lxr.linux.no/linux+v2.6.36/COPYING),这个是GNU协议GPL的详细说明。

3、CREDITS(http://lxr.linux.no/linux+v2.6.36/CREDITS),这个是对Linux内核有贡献的部分程序员列表。

4、REPORTING-BUGS(http://lxr.linux.no/linux+v2.6.36/REPORTING-BUGS),这个是提交BUG的规范。

第二部分:了解Linux内核源码自带文档Documentation的总体结构以及Linux内核的编码风格

5、Documentation(http://lxr.linux.no/linux+v2.6.36/Documentation/),这个文件夹里面包含的就是Linux内核具体的文档内容,其中有一些比较重要的文档。

6、Documentation/00-INDEX(http://lxr.linux.no/linux+v2.6.36/Documentation/00-INDEX),这个文档介绍了Documentation文件夹下各个文档的大致作用和内容。

7、Documentation/Changes(http://lxr.linux.no/linux+v2.6.36/Documentation/Changes),这个文档列出并介绍了运行Linux内核的最小工具软件集合。

8、Documentation/CodeStyle(http://lxr.linux.no/linux+v2.6.36/Documentation/CodingStyle),这个文档介绍了Linux内核的编码风格。

第三部分:开始学习Linux内核

9、Documentation/HOWTO(http://lxr.linux.no/linux+v2.6.36/Documentation/HOWTO),介绍了怎样成为一位内核开发人员。

10、Documentation/kernel-docs.txt(http://lxr.linux.no/linux+v2.6.36/Documentation/kernel-docs.txt),开始学习Linux内核的你一定需要很多参考书籍,这个文档列出了很多学习Linux内核的优秀资源,包括很多著名书籍,例如:Linux Device Drivers等。

第四部分:Linux内核的具体模块的文档,这方面的文档可以根据自己的研究兴趣来查看,例如:Linux内核的启动代码文档、文件系统代码文档等。

11、Documentation/x86/boot.txt(http://lxr.linux.no/linux+v2.6.36/Documentation/x86/boot.txt),介绍了Linux内核启动时使用协议,内存结构图等。

12、Documentation/filessystems/ext4.txt(http://lxr.linux.no/linux+v2.6.36/Documentation/filesystems/ext4.txt),介绍了ext4文件系统

LINUX 内核文档地址的更多相关文章

  1. Linux内核官方文档atomic_ops.txt【摘自Linux 内核文档】

    摘自Linux内核文档 Documentation/atomic_ops.txt,不是本人原创 Semantics and Behavior of Atomic and Bitmask Operati ...

  2. Where is the kernel documentation?; Ubuntu 上如何安装 linux 内核文档;fedora 上如何安装linux内核文档?

    有时候,linux内核文档对我们很重要,我们可以在linux系统中安装,并及时查看: 参考链接:https://askubuntu.com/questions/841043/where-is-the- ...

  3. Linux内核文档:如何写符合 kernel-doc 规范的注释

    简介 Linux内核使用 Sphinx 实现把 Documentation 目录下的 reStructuredText 文件转换为非常漂亮的文档.文档既可以通过 make htmldocs 转换成 H ...

  4. Linux--2 Linux之文档与目录结构、shell基本命令

    一.Linux之文档与目录结构 1.Linux之文档与目录结构 Linux目录结构的组织形式和Windows有很大的不同.Linux没有“盘(如C盘.D盘.E盘)”的概念,而是建立一个根"/ ...

  5. Linux之文档与目录结构 目录的相关操作 Linux的文件系统

    Linux之文档与目录结构   Linux文件系统结构 Linux目录结构的组织形式和Windows有很大的不同.首先Linux没有“盘(C盘.D盘.E盘)”的概念.已经建立文件系统的硬盘分区被挂载到 ...

  6. Linux之文档与目录结构 (/ 用法, 相对路径,绝对路径)

    Linux之文档与目录结构   Linux文件系统结构 Linux目录结构的组织形式和Windows有很大的不同.首先Linux没有“盘(C盘.D盘.E盘)”的概念.已经建立文件系统的硬盘分区被挂载到 ...

  7. Linux Kbuild文档(转)

    转载链接:http://blog.chinaunix.net/uid-10221131-id-2943265.html Linux Kbuild文档 Linux Kbuild文档 V 0.1 tang ...

  8. 运维 03 Linux之文档与目录结构

    Linux之文档与目录结构   Linux文件系统结构 Linux目录结构的组织形式和Windows有很大的不同.首先Linux没有“盘(C盘.D盘.E盘)”的概念.已经建立文件系统的硬盘分区被挂载到 ...

  9. Linux 在文档中查找满足条件的行并输出到文件:

    Linux 在文档中查找满足条件的行并输出到文件: 文件名称: dlog.log    输出文件: out.log 1.满足一个条件(包含  “TJ”  )的语句: grep  “TJ”  dlog. ...

随机推荐

  1. linux命令——rm

    rm是常用的命令,该命令的功能为删除一个目录中的一个或多个文件或目录,它也可以将某个目录及其下的所有文件及子目录均删除.对于链接文件,只是删除了链接,原有文件均保持不变. rm是一个危险的命令,使用的 ...

  2. linux常用命令之--磁盘管理命令

    linux的磁盘管理命令 1.查看磁盘空间 df:用于显示磁盘空间的使用情况 其命令格式如下: df [-option] 常用参数: -i:使用inodes显示结果 -k:使用KBytes显示结果 - ...

  3. QT4.7.4-vs2008和vs2010的安装并编写测试程序

    QT的安装着实费了我好大的劲,之前试过QT5.1.0与VS2010的安装,但是因为设置的地方太多,程序运行总是不成功,所以最后选用QT4.7.4和VS2008与VS2010来编写程序.写这篇文章来总结 ...

  4. maven学习系列第二课,关于springmvc的pop.xml的依赖的添加

    不说废话了,图的书序就是操作顺序 1. 2.

  5. JavaScript数值转换总结

    在JavaScript中,数值转换一般有三种方式: 一.Number(param)函数:param可以用于任何数据类型 1.1  param是Boolean值,true和false分别转换为1和0: ...

  6. js滑动门及对像的使用

    function scrollDoor() { } scrollDoor.prototype = { sd: function (menus, divs, openClass, closeClass) ...

  7. homework-03

    1.分工准备 这次的工作是结对编程,在第二次作业中我是使用python完成的作业,而小明是使用C完成的作业.因为打算使用动态链接库的方式将第二次的代码嵌入到本次的作业中,而python生成动态链接库不 ...

  8. 【转】iOS 浅谈:深.浅拷贝与copy.strong

    深.浅拷贝 copy mutableCopy NSString 1 2 3 4 5 6 NSString *string = @"汉斯哈哈哈"; // 没有产生新对象 NSStri ...

  9. CodeForces 489A SwapSort (选择排序法)

    SwapSort 题目链接: http://acm.hust.edu.cn/vjudge/contest/121332#problem/A Description In this problem yo ...

  10. Educational Codeforces Round 15 (A - E)

    比赛链接:http://codeforces.com/contest/702 A. Maximum Increase A题求连续最长上升自序列. [暴力题] for一遍,前后比较就行了. #inclu ...