UNIX/Linux 系统管理技术手册阅读(七)
UNIX/Linux 系统管理技术手册阅读(七)
2016.8.22 9:00-9:40
The keywords database can become out of date. If you add additional man pages to your system, you may need to rebuild this file with mandb (Ubuntu, SUSE), makewhatis (Red Hat), or catman -w (Solaris, HP-UX, AIX).
keyword指代的库可能已经过期了。如果要向系统添加man手册页,需要构这个库文件,在Ubuntu、SUSE上使用mandb命令,在Red Hat上使用makewhatis命令,在Solaris、HP-UX和AIX上使用catman-w命令。
1.9.3 Storage of man pages
1.9.3 手册页的保存
nroff input for man pages is usually kept in directories under /usr/share/man. Linux systems compress them with gzip to save space. (The man command knows how to uncompress them on the fly.) The man command maintains a cache of formatted pages in /var/cache/man or /usr/share/man if the appropriate directories are writable, but this is a security risk. Most systems preformat the man pages once at installation time (see catman) or not at all.
手册页的nroff输入通常保存在/usr/share/man/下的多个目录中。Linux系统会把他们用gzip压缩以节省空间(命令man知道如何当场将它们解压缩)。如果在/var/cache/man或者/var/share/man下的适当目录有写入权限,那么命令man会在那里维护一个有格式的手册页的缓存,但是这存在安全风险。大多数系统会在安装的时候预处理一次手册页的格式(参考catman命令),或者根本不做预处理。
Solaris understands man pages formatted with SGML in addition to the traditional nroff. The SGML pages have their own section directories underneath /usr/share/man.
除了传统的nroff格式之外,Solaris还支持SGML格式的手册页。SGML格式手册页相关各节的目录都在/usr/share/man下。
The man command can search several man page repositories to find the manual pages you request. On Linux systems, you can find out the current default search path with the manpath command. This path (from Ubuntu) is typical:
命令man会在若干不同的目录中寻找用户需要的手册页。在Linux系统上,用户可以使用manpath命令来确定搜索路径。这个搜索路径(在Ubuntu中)一般为;
ubuntu$ manpath
/usr/local/man:/usr/local/share/man:/usr/share/man
If necessary, you can set your MANPATH environment variable to override the default path:
export MANPATH=/home/share/localman:/usr/share/man
如果有必要,用户可以设置自己的环境变量MANPATH来覆盖默认路径;
Some systems let you set a custom system-wide default search path for man pages,
which can be useful if you need to maintain a parallel tree of man pages such as
those generated by OpenPKG. If you want to distribute local documentation in the form of man pages, however, it is simpler to use your system’s standard packaging mechanism and to put man pages in the standard man directories. See Chapter 12, Software Installation and Management, for more details.
有些系统让用户为手册页设置一个自定义的系统级默认搜索路径,如果用户想要维护平行的一套man手册页目录树(比如OpenPKG创建的目录树),就能够用上这种功能。不过,如果用户想要手册页的形式发布本地文档,更简单的做法是,用系统的标准打包机制打包,并把这些手册页放在标准的man目录下。参考第12章了解有关软件安装和管理的更多知识。
2016.8.23 16:00-16:36
1.9.4 GNU Texinfo
Linux systems include a sort of supplemental on-line man page system called Texinfo. It was invented long ago by the GNU folks in reaction to the fact that the nroff command to format man pages was proprietary to AT&T. These days we have GNU’s own groff to do this job for us and the nroff issue is no longer important, but Texinfo still lumbers along like a zombie in search of human brains.
1.9.4 GNUTexinfo
Linux系统包括一种补充的联机手册页系统,叫做Textinfo。很久以前,GNU人士针对设定man页面格式的nroff为AT&T专有命令这一现实情况,发明了Texinfo文档。现在,我们已经有了GNU的groff来为我们完成这项工作,nroff的问题不再重要了,但它仍然在人们脑海里阴魂不散。
Although the use of Texinfo seems to be gradually fading, a few GNU packages persist in documenting themselves with Texinfo files rather than man pages. You can pipe the output of the Texinfo reader, info, through less to evade info’s builtin navigation system.
虽然Texinfo逐渐不用了,但扔有很少几个GNU软件坚持用Texinfo文件而不是man页面来提供自身的文档。用户可以把读取Texinfo的命令info的输出通过管道送给less命令,避开info命令内建的浏览体系。
Fortunately, packages that are documented with Texinfo usually install man page stubs that tell you to use the info command to read about those particular packages. You can safely stick to the man command for doing manual searches and delve into info land only when instructed to do so. info info initiates you into the dark mysteries of Texinfo.
幸运的是,采用Texinfo提供文档的软件包通常会安装指示性的man页面,告诉用户使用info命令来阅读了解那些特殊的软件包。用户可以坚持使用man命令来查找手册,只有在被告知采用info时再这么做,这样的做法很保险。命令info info将会把用户带入Texinfo的黑暗神秘世界。
1.10 OTHER AUTHORITATIVE DOCUMENTATION
Man pages are just a small part of the official documentation. Most of the rest, unfortunately, is scattered about on the web.
手册页仅仅是官方文档中的很小一部分。遗憾的是,其余更大一部分的文档都散布在web上。
System-specific guides
Major vendors have their own dedicated documentation projects, and many continue to produce useful book-length manuals. These days the manuals are usually found on-line rather than in the form of printed books. The extent and quality of the documentation vary widely, but most vendors produce at least an administration guide and an installation guide. Table 1.4 shows where to look for each of our example systems.
1.10.1 针对系统的专门指南
大多数发行商都有自己专门的文档项目,许多发行商还出整本书那样的手册。现在一般都能找到联机形式的手册,而不是纸质的书。文档的规模和质量则大有不同,但是大多数发行商都至少提供一份系统管理指南和一份安装指南。表1.4给出了在哪儿可以找到我们示例系统的文档。
The standout in this crowd is IBM, which produces a raft of full-length books on a variety of administration topics. You can buy them as books, but they’re also available for free as downloads. The downside to IBM’s completeness is that many of the documents seem to lag a version or two behind the current release of AIX.
在这其间最出众的是IBM,IBM针对系统管理的各方面出版了大量篇幅完整的图书。读者可以买书,也可以直接免费-。IBM的文档完整也有不好的一面,就是许多文档似乎都要比当前AIX的发布落后一两个版本号。
Red Hat is the unfortunate laggard in the documentation race. Most of its documents relate to its proprietary value-added systems rather than to Linux administration generally.
在文档方面的竞赛中,Red Hat遗憾地落后了。Red Hat的大多数文档都和其专有的有附加值的系统有关系,而不是介绍通用的Linux管理技术。
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~