man(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨페이지이름
검색(S)

man(1)

Name
     man - find and display reference manual pages

Synopsis
     man [-] [-adFlrt] [-M path] [-T macro-package] [-s section] name...


     man [-M path] [-s section] -k query...


     man [-M path] -f file...


     man [-M path] [-s section] -K query...

Description
     The man command  displays  information  from  the  reference
     manuals.  It  displays complete manual pages that you select
     by name, or summaries selected either by query (- k or  -K),
     or  by  the  name  of an associated file (- f). If no manual
     page is located, man prints an error message.

  Source Format
     Reference Manual pages are marked up with either nroff  (see
     groff(1))  or  SGML  (Standard  Generalized Markup Language)
     tags (see sgml(5)). The man command recognizes the  type  of
     markup  and  processes  the  file  accordingly.  The various
     source files are kept in separate directories  depending  on
     the type of markup.

  Location of Manual Pages
     The online Reference Manual page directories are convention-
     ally  located  in  /usr/share/man.  The  nroff  sources  are
     located in the  /usr/share/man/man*  directories.  The  SGML
     sources are located in the /usr/share/man/sman* directories.
     Each directory corresponds to a section of the manual. Since
     these  directories  are optionally installed, they might not
     reside on your host. You might have to mount  /usr/share/man
     from a host on which they do reside.


     If  there  are  preformatted,  up-to-date  versions  in  the
     corresponding  cat* or fmt* directories, man simply displays
     or prints those versions. If  the  preformatted  version  of
     interest  is  out of date or missing, man reformats it prior
     to display and stores the preformatted version  if  cat*  or
     fmt*  is  writable.  The  index  files  are not updated. See
     catman(1M). If directories for the preformatted versions are
     not provided, man reformats a page whenever it is requested.
     man uses a temporary file to store the formatted text during
     display.

     If the standard output is not a terminal, or if the `-' flag
     is  given,  man  pipes its output through cat(1). Otherwise,
     man pipes its output through less(1) to  handle  paging  and
     underlining on the screen.

  Query Strings
     Using -k or -K options, manual pages can  be  searched  with
     query,  one  or  more  terms  or phrases. It supports index-
     file-based, full text searching, query expansion,  stemming,
     and  section matching. For information regarding how to gen-
     erate the index files, refer to catman(1M).


     A term is a sequence of characters from  a  valid  character
     set  that  contains  all alpha characters, digits and under-
     line, {a-z,A-Z,_}. It is a useful semantic  unit  for  full-
     text  processing.  But,  in  all  valid terms, stop words(or
     terms) will not be indexed and searched.


     Stop words are some  of  the  most  common,  short  function
     terms.  Such  as the, is, at which and so on. In some cases,
     stop terms can  cause  problems,  especially  when  searched
     query  contains them. Such as "The zfs system", "take that",
     so, whenever index building or query search, the stop  words
     will be removed away to improve man(1) performance.


     A phrase is composed of multiple terms  that  are  catenated
     together  by non-indexed characters, usually a space charac-
     ter. In a terminal, when a user searches  a  phrase,  it  is
     usually encompassed with double quote.


     Query expansion is a useful technique in  full-text  domain.
     It  is  used  to  refactor  the  original user inputed query
     string and reweigh added query  terms,  avoiding  the  empty
     search  result  to  improve  man(1) full-text search perfor-
     mance.


     Term query expansion is aimed to  help  users  automatically
     complement  incompleted inputed terms and give the corrected
     form.


     Acronym query expansion is used to help users complete acro-
     nym expansion when the user query contains some acronyms. It
     will automatically append the corresponding full name string
     to the user query.

     Stemming for English, for  example,  identifies  the  string
     cats,  catlike,  catty, and so forth, based on the root cat.
     It identifies stemmer, stemming, and stemmed based on  stem.
     A  stemming  algorithm  reduces  the  words fishing, fished,
     fish, and fisherto the root word, fish.


     Section matching allows users  specify  a  section  name  in
     query  string to limit the searched scope in each man pages.
     The section name refer to the section title in each man man-
     page  to  help define a manpage layout or structure. Such as
     "NAME", "SYNOPSIS", "DESCRIPTION", and so on.


     Matching is done in  case-insensitive  manner.  Stemming  is
     done for English manual pages only.


     Matched manual pages are sorted and presented based  on  the
     score of the query matches in ascending order.


     Oracle Solaris manual pages are divided into  sections  such
     as  NAME,  SYNOPSIS,  DESCRIPTION,  and  so forth. Users can
     specify the scope  of  search  into  a  section  as  details
     described in the -K option.

Options
     The following options are supported:

     -a
         Shows all manual pages matching name within the  MANPATH
         search  path.  Manual  pages  are displayed in the order
         found.


     -d
         Debugs. Displays what a section-specifier evaluates  to,
         method used for searching, and paths searched by man.


     -f file ...
         man attempts to locate manual pages related  to  any  of
         the  given  files.  It  prints  summaries containing the
         resulting basename or names. This is actually same  with
         whatis(1).

         This option uses the index files.  Refer  to  catman(1M)
         for details on how index files are generated.

     -F
         Forces man to search all directories specified  by  MAN-
         PATH  or  the  man.cf  file, rather than using the index
         lookup files. This option is useful if the  index  files
         are  not  up to date and they have been made the default
         behavior of the man command. The option  therefore  does
         not have to be invoked and is documented here for refer-
         ence only.


     -k query ...
         Search for the specified query from the index files  and
         prints  out  summaries.  Only  NAME section is searched.
         This is actually same with apropos(1).

         See the -K option  for  information  regarding  how  the
         index files are generated.


     -K query ...
         Search for the specified query from the index files  and
         prints  out  summaries. All of the sections are searched
         by default.

         If you supply a section name ending with a colon (:)  at
         the  query  option argument as the first text from left,
         just as section name: query, the search  for  the  query
         string  is  done  on  the specified section only. If the
         specified section name does not exist, it will list  all
         the supported section name for users.

         The index files in /usr/share/man and /usr/gnu/share/man
         used  by -f, -k, and -K are automatically generated when
         man pages in those directories are installed or  updated
         and  the  packages delivering them have tagged the files
         with restart_fmri=svc:/application/man-index:default  as
         specified  in pkg(5). They may also be generated by run-
         ning svcadm restart application/man-index  manually,  or
         running catman(1M) with the -w.


     -l
         Lists all manual pages found matching  name  within  the
         search path.


     -M path
         Specifies an alternate search  path  for  manual  pages.
         path  is a colon-separated list of directories that con-
         tain manual page directory  subtrees.  For  example,  if
         path  is /usr/share/man:/usr/local/man, man searches for
         name in the standard location, and then  /usr/local/man.
         When  used  with the -f, -k or -K options, the -M option
         must appear  first.  Each  directory  in  the   path  is
         assumed  to  contain  subdirectories of the form man* or
         sman* , one for each section. This option overrides  the
         MANPATH environment variable.


     -r
         Reformats the manual page, but does not display it. This
         replaces the man - -t name combination.


     -s section ...
         Specifies sections of the manual for man to search.  The
         directories  searched  for  name  are  limited  to those
         specified by section. section can be a numerical  digit,
         perhaps  followed  by  one  or more letters to match the
         desired section of  the  manual,  for  example,  "3lib".
         Also,  section  can  be a word, for example, local, new,
         old,  public.                              section   can
         also be a letter. To specify multiple sections, separate
         each section with a comma.  This  option  overrides  the
         MANPATH  environment  variable  and the man.cf file. See
         Search Path below for an explanation of how man conducts
         its search.


     -t
         man man outputs postscript to stdout. If both the -  and
         -t  flags are given, man updates the troffed versions of
         each named name (if necessary),  but  does  not  display
         them.


     -T macro-package
         Formats manual pages using macro-package rather than the
         standard  -mandoc  macros. If it starts with `-m', it is
         handled that a macro package is specified as  an  option
         in groff. You can continue to add `-r' option to specify
         macros's option. See groff(1) and groff_man(5) for these
         options.  If  it  starts  with `/', it is handled that a
         macro package  is  directly  specified.  A  macro  under
         /usr/share/lib/tmac  can be specified by this. See Exam-
         ple 5.

Operands

     The following operand is supported:

     name
         The name of a standard utility or a keyword.

Usage
     The usage of man is described below:

  Manual Page Sections
     Entries in the reference manuals  are  organized  into  sec-
     tions. A section name consists of a major section name, typ-
     ically a single digit, optionally followed by  a  subsection
     name, typically one or more letters. An unadorned major sec-
     tion name, for example, "9", does not act as an abbreviation
     for  the  subsections  of  that name, such as "9e", "9f", or
     "9s". That is, each subsection must be  searched  separately
     by  man  -s. Each section contains descriptions apropos to a
     particular reference  category,  with  subsections  refining
     these distinctions. See the intro manual pages for an expla-
     nation of the classification used in this release.


     The following contains a brief description  of  each  manual
     page section and the information it references:

         o    Section 1 describes, in  alphabetical  order,  com-
              mands available with the operating system.

         o    Section 1M describes, in alphabetical  order,  com-
              mands  that are used chiefly for system maintenance
              and administration purposes.

         o    Section 2 describes all of the system  calls.  Most
              of  these  calls have one or more error returns. An
              error condition is indicated by an otherwise impos-
              sible returned value.

         o    Section 3  describes  functions  found  in  various
              libraries, other than those functions that directly
              invoke UNIX system primitives, which are  described
              in Section 2.

         o    Section 4 outlines the formats  of  various  files.
              The  C  structure declarations for the file formats
              are given where applicable.

         o    Section 5 contains miscellaneous documentation such
              as character-set tables.

         o    Section 7  describes  various  special  files  that
              refer  to  specific hardware peripherals and device
              drivers. STREAMS software drivers, modules and  the
              STREAMS-generic   set  of  system  calls  are  also
              described.

         o    Section  9E  describes  the  DDI   (Device   Driver
              Interface)/DKI (Driver/Kernel Interface), DDI-only,
              and DKI-only entry-point routines a  developer  can
              include in a device driver.

         o    Section 9F describes the kernel functions available
              for use by device drivers.

         o    Section 9S describes the data  structures  used  by
              drivers to share information between the driver and
              the kernel.

  Search Path
     Before searching for a given name, man constructs a list  of
     candidate directories and sections. man searches for name in
     the directories specified by the MANPATH  environment  vari-
     able.


     In the absence of MANPATH, man constructs  its  search  path
     based  upon the PATH environment variable, primarily by sub-
     stituting man for the last component of  the  PATH  element.
     Special  provisions  are added to account for unique charac-
     teristics of directories such as /sbin,  /usr/xpg4/bin,  and
     others.  If  the  file  argument contains a / character, the
     dirname portion of the argument is used  in  place  of  PATH
     elements to construct the search path.


     Within the manual page directories, man confines its  search
     to the sections specified in the following order:

         o    sections specified on the command line with the  -s
              option

         o    sections embedded in the MANPATH environment  vari-
              able

         o    sections specified in  the  man.cf  file  for  each
              directory  specified  in  the  MANPATH  environment
              variable


     If none of the above exist, man searches each  directory  in
     the manual page path, and displays the first matching manual
     page found.

     The man.cf file has the following format:

       MANSECTS=section[,section]...




     Lines beginning with `#' and blank lines are considered com-
     ments,  and are ignored. Each directory specified in MANPATH
     can contain a manual page configuration file, specifying the
     default search order for that directory.

Formatting Manual Pages
     Manual pages are marked up in  groff(1)  or  sgml(5).  nroff
     manual pages are processed by groff(1) or gtroff(1) with the
     -mandoc macro package. Please refer to groff(1) for informa-
     tion  on macro usage. SGML-tagged manual pages are processed
     by an SGML parser and passed to the formatter.

  Preprocessing nroff Manual Pages
     When formatting an nroff manual page, man examines the first
     line to determine whether it requires special processing. If
     the first line is a string of the form:

       `\" X




     where X is separated from the `"' by a single SPACE and con-
     sists  of  any  combination  of  characters in the following
     list, man pipes its input to gtroff(1) or  groff(1)  through
     the corresponding preprocessors.

     e
         geqn(1)


     r
         grefer(1)


     t
         gtbl(1)


     v
         vgrind(1)

  Referring to Other nroff Manual Pages
     If the first line of the nroff manual page is a reference to
     another manual page entry fitting the patterns:

       .so man*/sourcefile
       .so sourcefile




     man processes the indicated file in  place  of  the  current
     one. The reference must be expressed as a path name relative
     to the root of the manual page directory subtree when a sha-
     dow  file is in different subdirectories with its reference,
     just like the first pattern. If they are in the same section
     subdirectory(man*),  the  reference  can  be  expressed as a
     filename, like the second pattern.


     When the second or any subsequent line starts with .so,  man
     ignores  it; related roff processes the request in the usual
     manner.

  Processing SGML Manual Pages
     Manual pages are identified as being marked up  in  SGML  by
     the  presence of the string <!DOCTYPE. If the file also con-
     tains the string SHADOW_PAGE, the  file  refers  to  another
     manual  page  for  the content. The reference is made with a
     file entity reference to the manual page that  contains  the
     text. This is similar to the .so mechanism used in the nroff
     formatted manual pages.

Environment Variables
     See environ(5) for descriptions of the following environment
     variables  that  affect  the execution of man: LANG, LC_ALL,
     LC_CTYPE, LC_MESSAGES, and NLSPATH.

     MANPATH
         A colon-separated list of  directories;  each  directory
         can  be  followed by a comma-separated list of sections.
         If  set,  its  value  overrides  /usr/share/man  as  the
         default  directory  search path, and the  man.cf file as
         the default section search path. The -M and -  s  flags,
         in turn, override these values.)


     PAGER
         A program to use for interactively delivering man's out-
         put to the screen. If not set, `less -ins' is used.

     TCAT
         The name of the program to use to display troffed manual
         pages.


     TROFF
         The name of the formatter to use when  the  -t  flag  is
         given.

Examples
     Example 1 Creating a Text Version of a Manual Page


     The following example creates the  pipe(2)  manual  page  in
     ASCII text:


       % man pipe.2 | col -x -b > pipe.text




     This is an alternative to using  man  -t,  which  sends  the
     manual page to the default printer, if the user wants a text
     file version of the manual page.


     Example 2 Getting a List of Manual Pages that Match  One  or
     More Terms


     The following example gets a list of manual pages that match
     for the term zfs or create:


       % man -K zfs create



     Example 3 Getting a List of Manual Pages that Match  One  or
     More Phrases


     The following example gets a list of manual pages that match
     for  the  quote-enclosed  phrases,  "zfs create" or "storage
     pool".


       % man -K `zfs create' "storage pool"

     Example 4 Getting a List of Manual Pages that Match Terms or
     Phrases in a Section


     The following example gets a list of manual pages that  have
     the term zfs in the SEE ALSO section:


       % man -K see also: zfs




     The following example gets a list of manual pages that  have
     the phrase "zfs create" in the Examples section:


       % man -K examples: "zfs create"



     Example 5 Changing the Default Macro Package


     The following example sets the line width to 67 columns  and
     outputs  in multiple pages instead of single long page. This
     realizes look and feel more similar to output generated with
     man(5) macro.


       % man -T `-mandoc -rLL=67n -rcR=0' zfs




     The following example uses actual man(5)  macro  instead  of
     the default mandoc macro.


       % man -T /usr/share/lib/tmac/an zfs

Exit Status
     The following exit values are returned:

     0
         Successful completion.

     >0
         An error occurred.

Files
     /usr/share/man
         Root of the standard manual page directory subtree


     /usr/share/man/man?/*
         Unformatted nroff manual entries


     /usr/share/man/man_index/*
         Table of Contents and keyword database.

         Generated files include:

             o    /usr/share/man/man-index/term.idx

             o    /usr/share/man/man-index/term.dic

             o    /usr/share/man/man-index/term.req

             o    /usr/share/man/man-index/term.pos

             o    /usr/share/man/man-index/term.doc

             o    /usr/share/man/man-index/term.exp


     /usr/share/man/sman?/*
         Unformatted SGML manual entries


     /usr/share/man/cat?/*
         nroffed manual entries


     /usr/share/man/fmt?/*
         troffed manual entries


     /usr/share/groff/<version>/tmac/mandoc.tmac
         Standard -mandoc macro package used by default

     /usr/share/lib/sgml/locale/C/dtd/*
         SGML document type definition files


     /usr/share/lib/sgml/locale/C/solbook/*
         SGML style sheet and entity definitions directories


     /usr/share/lib/pub/eqnchar
         Standard definitions for eqn and neqn


     man.cf
         Default search order by section

Attributes
     See attributes(5) for descriptions of the  following  attri-
     butes:



     tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i)  ATTRI-
     BUTE   TYPEATTRIBUTE  VALUE  _  Availabilitytext/doctools  _
     CSIEnabled, see NOTES.   _  Interface  StabilityCommitted  _
     StandardSee standards(5).

See Also
     apropos(1),  cat(1),  col(1),  geqn(1),  less(1),  groff(1),
     grefer(1),   gtbl(1),   gtroff(1),   vgrind(1),   whatis(1),
     catman(1M),  attributes(5),  environ(5),  man(5),   sgml(5),
     standards(5)

Notes
     The -f, -k, and -K options use the  index  files  which  are
     created  by  the  SMF  service as specified in man(5), or by
     manually using catman(1M) with the -w option.


     The windex database file is no longer used. The windex data-
     base file has replaced with the new index files.


     The man command  is  CSI-capable.  However,  some  utilities
     invoked  by  the  man  command,  are not verified to be CSI-
     capable. Because of this, the man command with the -t option
     can  not  handle non ASCII data. Also, using the man command
     to display manual  pages  that  require  special  processing
     through geqn, grefer, gtbl, or vgrind cannot be CSI-capable.

     Default PAGER program less cannot  handle  non  UTF-8  multi
     byte     characters.     You    should    set    PAGER    to
     `/usr/xpg4/bin/more'  if  your  environment  is  non   UTF-8
     locale.


     Manual pages in SGML format will not be supported in  future
     releases of Oracle Solaris.

Bugs
     The manual is supposed to be reproducible either on a photo-
     typesetter  or  on an ASCII terminal. However, on a terminal
     some information (indicated by font changes,  for  instance)
     is lost.
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3