Seth Woolley's Man Viewer

Manual for man - man man

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

man(1,5,7)(1)                                                                  man(1,5,7)(1)



NAME
       man(1,5,7) - format and display the on-line manual pages

SYNOPSIS
       man(1,5,7)  [-acdfFhkKtwW]  [--path]  [-m system] [-p string(3,n)] [-C config_file]
       [-M pathlist] [-P pager] [-S section_list] [section] name ...


DESCRIPTION
       man(1,5,7) formats and displays the on-line manual pages.  If you specify sec-
       tion,  man(1,5,7)  only looks in(1,8) that section of the manual.  name is normally
       the name of the manual page, which is typically the name of a  command,
       function,  or  file.   However,  if(3,n)  name contains a slash (/) then man(1,5,7)
       interprets it as a file(1,n) specification, so that you can do  man(1,5,7)  ./foo.5
       or even man(1,5,7) /cd/foo/bar.1.gz.

       See  below  for  a  description  of where man(1,5,7) looks for the manual page
       files.


OPTIONS
       -C  config_file
              Specify  the  configuration  file(1,n)  to  use;   the   default   is
              /usr/share/misc/man.conf.  (See man.conf(5).)

       -M  path
              Specify  the list of directories to search for man(1,5,7) pages.  Sepa-
              rate the directories with colons.  An empty list is the same  as
              not specifying -M at all.  See SEARCH PATH FOR MANUAL PAGES.

       -P  pager
              Specify  which pager to use.  This option overrides the MANPAGER
              environment variable, which in(1,8) turn overrides  the  PAGER  vari-
              able.  By default, man(1,5,7) uses /bin/less(1,3) -is.

       -S  section_list
              List  is  a  colon  separated list of manual sections to search.
              This option overrides the MANSECT environment variable.

       -a     By default, man(1,5,7) will exit(3,n,1 builtins) after displaying the first manual page
              it  finds.  Using this option forces man(1,5,7) to display all the man-
              ual pages that match name, not just the first.

       -c     Reformat the source man(1,5,7) page, even when an up-to-date  cat  page
              exists.   This  can  be meaningful if(3,n) the cat page was formatted
              for a screen with a different number of columns, or if(3,n) the  pre-
              formatted page is corrupted.

       -d     Don't  actually  display  the  man(1,5,7)  pages,  but do print gobs of
              debugging information.

       -D     Both display and print debugging info.

       -f     Equivalent to whatis.

       -F or --preformat
              Format only - do not display.

       -h     Print a one-line help message and exit.

       -k     Equivalent to apropos.

       -K     Search for the specified string(3,n) in(1,8)  *all*  man(1,5,7)  pages.  Warning:
              this  is  probably  very  slow!  It  helps to specify a section.
              (Just to give a rough idea, on my machine  this  takes  about  a
              minute per 500 man(1,5,7) pages.)

       -m  system
              Specify  an  alternate  set(7,n,1 builtins)  of man(1,5,7) pages to search based on the
              system name given.

       -p  string(3,n)
              Specify the sequence of preprocessors to  run  before  nroff  or
              troff.  Not all installations will have a full set(7,n,1 builtins) of preproces-
              sors.  Some of the preprocessors and the letters used to  desig-
              nate  them are: eqn (e), grap (g), pic (p), tbl (t), vgrind (v),
              refer (r).  This option  overrides  the  MANROFFSEQ  environment
              variable.

       -t     Use /usr/bin/groff(1,7) -Tps -mandoc to format the manual page, pass-
              ing the output to stdout.  The output from  /usr/bin/groff(1,7)  -Tps
              -mandoc  may  need  to  be passed through some filter(1,3x,3x curs_util) or another
              before being printed.

       -w or --path
              Don't actually display the man(1,5,7) pages, but  do  print  the  loca-
              tion(s) of the files that would be formatted or displayed. If no
              argument is given: display (on stdout) the list  of  directories
              that  is  searched by man(1,5,7) for man(1,5,7) pages. If manpath is a link(1,2) to
              man(1,5,7), then "manpath" is equivalent to "man(1,5,7) --path".

       -W     Like -w, but print file(1,n) names one per line,  without  additional
              information.   This is useful in(1,8) shell commands like man(1,5,7) -aW man(1,5,7)
              | xargs ls -l


CAT PAGES
       Man will try to save the formatted man(1,5,7) pages, in(1,8) order to save  format-
       ting time(1,2,n) the next time(1,2,n) these pages are needed.  Traditionally, format-
       ted versions of pages in(1,8) DIR/manX are saved in(1,8) DIR/catX, but other map-
       pings    from    man(1,5,7)   dir   to   cat   dir   can   be   specified   in(1,8)
       /usr/share/misc/man.conf.  No cat pages are saved when the required cat
       directory does not exist.  No cat pages are saved when they are format-
       ted for a line length different from 80.  No cat pages are  saved  when
       man.conf contains the line NOCACHE.

       It is possible to make man(1,5,7) suid to a user man. Then, if(3,n) a cat directory
       has owner man(1,5,7) and mode 0755 (only writable by man(1,5,7)), and the  cat  files
       have  owner  man(1,5,7)  and  mode  0644 or 0444 (only writable by man(1,5,7), or not
       writable at all), no ordinary user can change  the  cat  pages  or  put
       other  files  in(1,8) the cat directory. If man(1,5,7) is not made suid, then a cat
       directory should have mode 0777 if(3,n) all users(1,5) should be  able  to  leave
       cat pages there.

       The  option  -c  forces  reformatting a page, even if(3,n) a recent cat page
       exists.



SEARCH PATH FOR MANUAL PAGES
       man(1,5,7) uses a sophisticated method of finding manual page files, based  on
       the    invocation    options    and    environment    variables,    the
       /usr/share/misc/man.conf configuration file(1,n), and some built in(1,8)  conven-
       tions and heuristics.

       First  of  all, when the name argument to man(1,5,7) contains a slash (/), man(1,5,7)
       assumes it is a file(1,n) specification itself, and there  is  no  searching
       involved.

       But in(1,8) the normal case where name doesn't contain a slash, man(1,5,7) searches
       a variety of directories for a file(1,n) that could be a manual page for the
       topic named.

       If  you  specify  the -M pathlist option, pathlist is a colon-separated
       list of the directories that man(1,5,7) searches.

       If you don't specify -M but set(7,n,1 builtins) the MANPATH environment  variable,  the
       value  of  that  variable  is  the  list  of  the  directories that man(1,5,7)
       searches.

       If you don't specify an explicit path list  with  -M  or  MANPATH,  man(1,5,7)
       develops  its  own path list based on the contents of the configuration
       file(1,n) /usr/share/misc/man.conf.  The MANPATH statements in(1,8) the  configu-
       ration  file(1,n)  identify  particular directories to include in(1,8) the search
       path.

       Furthermore, the MANPATH_MAP statements add to the search path  depend-
       ing  on your command search path (i.e. your PATH environment variable).
       For each directory that may be in(1,8)  the  command  search  path,  a  MAN-
       PATH_MAP  statement  specifies  a directory that should be added to the
       search path for manual page files.  man(1,5,7) looks at the PATH variable  and
       adds the corresponding directories to the manual page file(1,n) search path.
       Thus, with the proper use of MANPATH_MAP, when you  issue  the  command
       man(1,5,7)  xyz,  you  get a manual page for the program that would run if(3,n) you
       issued the command xyz.

       In addition, for each directory in(1,8) the command search path (we'll  call
       it  a  "command  directory")  for  which  you do not have a MANPATH_MAP
       statement, man(1,5,7) automatically looks for a manual page directory "nearby"
       namely as a subdirectory in(1,8) the command directory itself or in(1,8) the par-
       ent directory of the command directory.

       You can disable the automatic "nearby" searches by  including  a  NOAU-
       TOPATH statement in(1,8) /usr/share/misc/man.conf.

       In  each  directory in(1,8) the search path as described above, man(1,5,7) searches
       for a file(1,n) named(5,8) topic.section, with an optional suffix on the  section
       number  and  possibly  a compression suffix.  If it doesn't find such a
       file(1,n), it then looks in(1,8) any subdirectories named(5,8) man(1,5,7)N or catN where N is
       the  manual section number.  If the file(1,n) is in(1,8) a catN subdirectory, man(1,5,7)
       assumes it is a formatted manual page file(1,n) (cat page).  Otherwise,  man(1,5,7)
       assumes it is unformatted.  In either case, if(3,n) the filename has a known
       compression suffix (like .gz), man(1,5,7) assumes it is gzipped.

       If you want to see where (or if(3,n)) man(1,5,7) would find the manual page  for  a
       particular topic, use the --path (-w) option.


ENVIRONMENT
       MANPATH
              If  MANPATH is set(7,n,1 builtins), man(1,5,7) uses it as the path to search for manual
              page files.  It overrides the configuration file(1,n) and  the  auto-
              matic  search  path,  but  is  overridden  by  the -M invocation
              option.  See SEARCH PATH FOR MANUAL PAGES.

       MANPL  If MANPL is set(7,n,1 builtins), its value is used as the display  page  length.
              Otherwise, the entire man(1,5,7) page will occupy one (long) page.

       MANROFFSEQ
              If  MANROFFSEQ is set(7,n,1 builtins), its value is used to determine the set(7,n,1 builtins) of
              preprocessors run before running nroff or  troff.   By  default,
              pages are passed through the tbl preprocessor before nroff.

       MANSECT
              If  MANSECT  is set(7,n,1 builtins), its value is used to determine which manual
              sections to search.

       MANWIDTH
              If MANWIDTH is set(7,n,1 builtins), its value is  used  as  the  width  manpages
              should  be displayed.  Otherwise the pages may be displayed over
              the whole width of your screen.

       MANPAGER
              If MANPAGER is set(7,n,1 builtins), its value is used as the name of the program
              to  use to display the man(1,5,7) page.  If not, then PAGER is used. If
              that has no value either, /bin/less(1,3) -is is used.

       LANG   If LANG is set(7,n,1 builtins), its value defines the name of  the  subdirectory
              where  man(1,5,7) first looks for man(1,5,7) pages. Thus, the command `LANG=dk
              man(1,5,7) 1 foo' will cause man(1,5,7) to  look(1,8,3 Search::Dict)  for  the  foo  man(1,5,7)  page  in(1,8)
              .../dk/man1/foo.1,  and  if(3,n)  it cannot find such a file(1,n), then in(1,8)
              .../man1/foo.1, where ... is a directory on the search path.

       NLSPATH, LC_MESSAGES, LANG
              The environment variables NLSPATH and LC_MESSAGES (or LANG  when
              the  latter  does not exist) play a role in(1,8) locating the message
              catalog.  (But the English messages are  compiled  in(1,8),  and  for
              English no catalog is required.)  Note that programs like col(1)
              called by man(1,5,7) also use e.g. LC_CTYPE.

       PATH   PATH helps determine the search path for manual page files.  See
              SEARCH PATH FOR MANUAL PAGES.

       SYSTEM SYSTEM is used to get the default alternate system name (for use
              with the -m option).

SEE ALSO
       apropos(1), whatis(1), less(1,3)(1), groff(1,7)(1), man.conf(5).

BUGS
       The -t option only works if(3,n) a troff-like program is installed.
       If you see blinking  \255  or  <AD>  instead  of  hyphens,  put  `LESS-
       CHARSET=latin1' in(1,8) your environment.

TIPS
       If you add the line

         (global-set-key  [(f1)]  (lambda () (interactive) (manual-entry (cur-
       rent-word))))

       to your .emacs file(1,n), then hitting F1 will give you the man(1,5,7) page for the
       library call at the current cursor position.

       To  get  a  plain  text  version(1,3,5)  of a man(1,5,7) page, without backspaces and
       underscores, try

         # man(1,5,7) foo | col -b > foo.mantxt




                               September 2, 1995                        man(1,5,7)(1)

References for this manual (incoming links)