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章了解有关软件安装和管理的更多知识。

时间: 2024-10-10 13:01:54

UNIX/Linux 系统管理技术手册阅读(七)的相关文章

UNIX/Linux 系统管理技术手册阅读(一)

从现在开始,给自己定了一个任务,每天看一段<UNIX/Linux 系统管理技术手册 第4版 >,中英对照着看,以此加强自己的英文阅读能力! 2016.8.8 16:30-17:30 SECTION ONE BASIC ADMINISTRATION 1 Where to Start 第一部分 基本管理技术 第1章 从何处入手 An awful lot of UNIX and Linux information is available these days,so we've designed t

UNIX/Linux 系统管理技术手册阅读(三)

2016.8.12 23:20-23:50 1.2 SUGGESTED BACKGROUND 1.2 读者的知识背景 We assume in this book that you have a certain amount of Linux or UNIX experience. In particular, you should have a general concept of how the system looks and feels from the user's perspecti

UNIX/Linux 系统管理技术手册阅读(十一)

2016.11.7 2 Scripting and the Shell Good system administrators write scripts. Scripts standardize and automate the performance of administrative chores and free up admins' time for more important and more interesting tasks. In a sense, scripts are al

UNIX/Linux 系统管理技术手册阅读(五)

2016.8.17 16:50-17:30 Some important questions to ask are Is this distribution going to be around in five years? Is this distribution going to stay on top of the latest security patches? Is this distribution going to release updated software promptly

UNIX/Linux 系统管理技术手册阅读(四)

2016.8.14 21:40-22:101.3 FRICTION BETWEEN UNIX AND LINUX1.3 UNIX他Linux之间的摩擦  Because they are similar, this book covers both UNIX and Linux systems. Unfortunately, mentioning UNIX and Linux together in the same sentence can sometimes be like stepping

UNIX/Linux 系统管理技术手册阅读(十)

2016.11.4 9:30-10:15 Adding new software If you do need to install additional software, you first need to determine the canonical name of the relevant software package. For example, you'd need to translate "I want to install locate" to "I n

UNIX/Linux 系统管理技术手册阅读(九)

2016.8.31 10:00-10:30 1.12 WAYS TO FIND AND INSTALL SOFTWARE Chapter 12, Software Installation and Management, addresses software provisioning in detail. But for the impatient, here's a quick primer on how to find out what's installed on your system

UNIX/Linux 系统管理技术手册阅读(十二)

2016.11.17 Variables and quoting Variable names are unmarked in assignments but prefixed with a dollar sign when their values are referenced. For example: $ etcdir='/etc' $ echo $etcdir /etc Do not put spaces around the = symbol or the shell will mis

UNIX/Linux 系统管理技术手册阅读(二)

2016.8.10 20:00-21:20 1.1.3 Performing backups 1.1.3 执行备份 Performing backups is perhaps the most important job of the system administrator, and it is also the job that is most often ignored or sloppily done. Backups are time consuming and boring, but