📄 ch50_01.htm
字号:
<HTML><!--Distributed by F --><HEAD><TITLE>[Chapter 50] Help--Online Documentation, etc.</TITLE><METANAME="DC.title"CONTENT="UNIX Power Tools"><METANAME="DC.creator"CONTENT="Jerry Peek, Tim O'Reilly & Mike Loukides"><METANAME="DC.publisher"CONTENT="O'Reilly & Associates, Inc."><METANAME="DC.date"CONTENT="1998-08-04T21:56:48Z"><METANAME="DC.type"CONTENT="Text.Monograph"><METANAME="DC.format"CONTENT="text/html"SCHEME="MIME"><METANAME="DC.source"CONTENT="1-56592-260-3"SCHEME="ISBN"><METANAME="DC.language"CONTENT="en-US"><METANAME="generator"CONTENT="Jade 1.1/O'Reilly DocBook 3.0 to HTML 4.0"><LINKREV="made"HREF="mailto:online-books@oreilly.com"TITLE="Online Books Comments"><LINKREL="up"HREF="part09.htm"TITLE="IX. Miscellaneous "><LINKREL="prev"HREF="ch49_09.htm"TITLE="49.9 Business Graphics with ipl "><LINKREL="next"HREF="ch50_02.htm"TITLE="50.2 The apropos Command "></HEAD><BODYBGCOLOR="#FFFFFF"TEXT="#000000"><DIVCLASS="htmlnav"><H1><IMGSRC="gifs/smbanner.gif"ALT="UNIX Power Tools"USEMAP="#srchmap"BORDER="0"></H1><MAPNAME="srchmap"><AREASHAPE="RECT"COORDS="0,0,466,58"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="467,0,514,18"HREF="jobjects/fsearch.htm"ALT="Search this book"></MAP><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch49_09.htm"TITLE="49.9 Business Graphics with ipl "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 49.9 Business Graphics with ipl "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><B><FONTFACE="ARIEL,HELVETICA,HELV,SANSERIF"SIZE="-1">Chapter 50</FONT></B></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch50_02.htm"TITLE="50.2 The apropos Command "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 50.2 The apropos Command "BORDER="0"></A></TD></TR></TABLE> <HRALIGN="LEFT"WIDTH="515"TITLE="footer"></DIV><DIVCLASS="CHAPTER"><H1CLASS="chapter"><ACLASS="title"NAME="UPT-CHP-50">50. Help--Online Documentation, etc.</A></H1><DIVCLASS="htmltoc"><P><B>Contents:</B><BR><ACLASS="sect1"HREF="#UPT-ART-4910"TITLE="50.1 UNIX Online Documentation ">UNIX Online Documentation </A><BR><ACLASS="sect1"HREF="ch50_02.htm"TITLE="50.2 The apropos Command ">The apropos Command </A><BR><ACLASS="sect1"HREF="ch50_03.htm"TITLE="50.3 apropos on Systems Without apropos ">apropos on Systems Without apropos </A><BR><ACLASS="sect1"HREF="ch50_04.htm"TITLE="50.4 whatis: One-Line Command Summaries ">whatis: One-Line Command Summaries </A><BR><ACLASS="sect1"HREF="ch50_05.htm"TITLE="50.5 whereis: Finding Where a Command Is Located ">whereis: Finding Where a Command Is Located </A><BR><ACLASS="sect1"HREF="ch50_06.htm"TITLE="50.6 Searching Online Manual Pages ">Searching Online Manual Pages </A><BR><ACLASS="sect1"HREF="ch50_07.htm"TITLE="50.7 How UNIX Systems Remember Their Name ">How UNIX Systems Remember Their Name </A><BR><ACLASS="sect1"HREF="ch50_08.htm"TITLE="50.8 Which Version Am I Using? ">Which Version Am I Using? </A><BR><ACLASS="sect1"HREF="ch50_09.htm"TITLE="50.9 Reading a Permuted Index ">Reading a Permuted Index </A><BR><ACLASS="sect1"HREF="ch50_10.htm"TITLE="50.10 Make Your Own Man Pages Without Learning troff">Make Your Own Man Pages Without Learning troff</A><BR><ACLASS="sect1"HREF="ch50_11.htm"TITLE="50.11 Writing a Simple Man Page with the -man Macros ">Writing a Simple Man Page with the -man Macros </A><BR><ACLASS="sect1"HREF="ch50_12.htm"TITLE="50.12 Common UNIX Error Messages ">Common UNIX Error Messages </A></P><P></P></DIV><DIVCLASS="sect1"><H2CLASS="sect1"><ACLASS="title"NAME="UPT-ART-4910">50.1 UNIX Online Documentation </A></H2><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-58872"></A><ACLASS="indexterm"NAME="AUTOID-58875"></A>The UNIX operating system was one of the first to include onlinedocumentation.It's not the best in the world - most users whohaven't internalized the manual set curse it once a week - but it hasproven surprisingly resilient.What's particularly interesting aboutUNIX's online documentation is that, unlike other early help systems,it isn't an adjunct to another set of printed documentation thatcontains the "real" truth.The online manual is complete,authoritative, and usually more current than any printeddocumentation.</P><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-58878"></A><ACLASS="indexterm"NAME="AUTOID-58880"></A>The basis for UNIX's online documentation is the <EMCLASS="emphasis">man</EM> command.Most simply, you use it as follows:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">% <CODECLASS="userinput"><B>man </B></CODE><CODECLASS="replaceable"><I>topic</I></CODE></PRE></BLOCKQUOTE></P><PCLASS="para">where <EMCLASS="emphasis">topic</EM> is usually the name of some command; but it can alsobe the name of a system call, a library routine, an I/O device, or anadministrative file (or file type).The output from <EMCLASS="emphasis">man</EM> is usually sent to a pager like<SPANCLASS="link"><EMCLASS="emphasis">more</EM> (<ACLASS="linkend"HREF="ch25_03.htm"TITLE="Using more to Page Through Files ">25.3</A>)</SPAN>,which allows you to page through.</P><PCLASS="para"><ACLASS="indexterm"NAME="AUTOID-58894"></A>The manual pages are grouped into a number of categories.Unfortunately, there are three slightly different groupings: one forBerkeley-based systems, one for System V, and one for systems derivedfor XENIX.<ACLASS="xref"HREF="ch50_01.htm#UPT-ART-4910-TAB-0"TITLE="UNIX Manual Page Categories">Table 50.1</A>lists these categories.<ACLASS="indexterm"NAME="AUTOID-58898"></A><ACLASS="indexterm"NAME="AUTOID-58901"></A><ACLASS="indexterm"NAME="AUTOID-58903"></A> </P><TABLECLASS="table"><CAPTIONCLASS="table"><ACLASS="title"NAME="UPT-ART-4910-TAB-0">Table 50.1: UNIX Manual Page Categories</A></CAPTION><THEADCLASS="thead"><TRCLASS="row"VALIGN="TOP"><THCLASS="entry"ALIGN="LEFT"ROWSPAN="1"COLSPAN="1">Category</TH><THCLASS="entry"ALIGN="LEFT"ROWSPAN="1"COLSPAN="1">BSD</TH><THCLASS="entry"ALIGN="LEFT"ROWSPAN="1"COLSPAN="1">System V</TH><THCLASS="entry"ALIGN="LEFT"ROWSPAN="1"COLSPAN="1">Xenix</TH></TR></THEAD><TBODYCLASS="tbody"><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">User commands</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">1</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">1</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">u_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">System calls</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">2</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">2</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">p_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Library routines</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">3</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">3</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">p_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">I/O and special files</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">4</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">7</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">p_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Administrative files</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">5</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">4</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">a_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Games</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">6</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">6 or 1</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">u_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Miscellaneous</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">7</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">5</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">anything goes</TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Administrative commands</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">8</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">8</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">a_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Maintenance commands</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">8</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">1M</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"><EMCLASS="emphasis">u_man </EM>or<EMCLASS="emphasis"> a_man</EM></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Local commands</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">l <EMCLASS="emphasis">(letter)</EM></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">*</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"></TD></TR><TRCLASS="row"VALIGN="TOP"><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">Obsolete commands</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">o <EMCLASS="emphasis">(letter)</EM></TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1">*</TD><TDCLASS="entry"ROWSPAN="1"COLSPAN="1"></TD></TR></TBODY></TABLE><PCLASS="para">[1]As you can see, System V makes a strange distinction between"administration" and "maintenance"; if you can figure out what theyreally mean, please let us know!To a poor Berkeley soul, this hasnever made sense.Some of these categories are subdivided further; for example, you maysee section 3S (the standard I/O library), 3M (the mathematicslibrary), 1G (Berkeley graphics), 1V (commands derived from System V),and so on.</P><BLOCKQUOTECLASS="footnote"><PCLASS="para">[1] System V and Xenix make no provision for "local" or"obsolete" commands in their <EMCLASS="emphasis">man</EM> system.</P></BLOCKQUOTE><PCLASS="para">If you want to refer to a manual entry in a specific section of themanual, you can give a command like one of these:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">% <CODECLASS="userinput"><B>man </B></CODE><CODECLASS="replaceable"><I>section topic</I></CODE>% <CODECLASS="userinput"><B>man -s </B></CODE><CODECLASS="replaceable"><I>section topic</I></CODE></PRE></BLOCKQUOTE></P><PCLASS="para">Some systems require the <EMCLASS="emphasis">-s</EM> "section" option.For example, if you want to read documentation about the<EMCLASS="emphasis">/etc/passwd</EM> file (rather than the <EMCLASS="emphasis">passwd</EM> command) on aSystem V machine, give the command:</P><PCLASS="para"><BLOCKQUOTECLASS="screen"><PRECLASS="screen">% <CODECLASS="userinput"><B>man -s 4 passwd</B></CODE></PRE></BLOCKQUOTE></P><PCLASS="para">This is an easy way to distinguish between topics with the same name,but in different groups.</P><DIVCLASS="sect1info"><PCLASS="SECT1INFO">- <SPANCLASS="authorinitials">ML</SPAN></P></DIV></DIV></DIV><DIVCLASS="htmlnav"><P></P><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><TABLEWIDTH="515"BORDER="0"CELLSPACING="0"CELLPADDING="0"><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch49_09.htm"TITLE="49.9 Business Graphics with ipl "><IMGSRC="gifs/txtpreva.gif"SRC="gifs/txtpreva.gif"ALT="Previous: 49.9 Business Graphics with ipl "BORDER="0"></A></TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="book"HREF="index.htm"TITLE="UNIX Power Tools"><IMGSRC="gifs/txthome.gif"SRC="gifs/txthome.gif"ALT="UNIX Power Tools"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172"><ACLASS="SECT1"HREF="ch50_02.htm"TITLE="50.2 The apropos Command "><IMGSRC="gifs/txtnexta.gif"SRC="gifs/txtnexta.gif"ALT="Next: 50.2 The apropos Command "BORDER="0"></A></TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP"WIDTH="172">49.9 Business Graphics with ipl </TD><TDALIGN="CENTER"VALIGN="TOP"WIDTH="171"><ACLASS="index"HREF="index/idx_0.htm"TITLE="Book Index"><IMGSRC="gifs/index.gif"SRC="gifs/index.gif"ALT="Book Index"BORDER="0"></A></TD><TDALIGN="RIGHT"VALIGN="TOP"WIDTH="172">50.2 The apropos Command </TD></TR></TABLE><HRALIGN="LEFT"WIDTH="515"TITLE="footer"><IMGSRC="gifs/smnavbar.gif"SRC="gifs/smnavbar.gif"USEMAP="#map"BORDER="0"ALT="The UNIX CD Bookshelf Navigation"><MAPNAME="map"><AREASHAPE="RECT"COORDS="0,0,73,21"HREF="../index.htm"ALT="The UNIX CD Bookshelf"><AREASHAPE="RECT"COORDS="74,0,163,21"HREF="index.htm"ALT="UNIX Power Tools"><AREASHAPE="RECT"COORDS="164,0,257,21"HREF="../unixnut/index.htm"ALT="UNIX in a Nutshell"><AREASHAPE="RECT"COORDS="258,0,321,21"HREF="../vi/index.htm"ALT="Learning the vi Editor"><AREASHAPE="RECT"COORDS="322,0,378,21"HREF="../sedawk/index.htm"ALT="sed & awk"><AREASHAPE="RECT"COORDS="379,0,438,21"HREF="../ksh/index.htm"ALT="Learning the Korn Shell"><AREASHAPE="RECT"COORDS="439,0,514,21"HREF="../lrnunix/index.htm"ALT="Learning the UNIX Operating System"></MAP></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -