2 .\" Generated automatically from man.1.in by the
5 .\" Man page for man (and the former manpath)
7 .\" Copyright (c) 1990, 1991, John W. Eaton.
9 .\" You may distribute under the terms of the GNU General Public
10 .\" License as specified in the README file that comes with the man 1.0
14 .\" jwe@che.utexas.edu
15 .\" Department of Chemical Engineering
16 .\" The University of Texas at Austin
17 .\" Austin, Texas 78712
19 .\" Many changes - aeb
21 .TH man 1 "September 2, 1995"
24 man \- format and display the on-line manual pages
26 manpath \- determine user's search path for man pages
48 formats and displays the on-line manual pages. If you specify
51 only looks in that section of the manual.
53 is normally the name of the manual page, which is typically the name
54 of a command, function, or file.
61 interprets it as a file specification, so that you can do
64 .B "man /cd/foo/bar.1.gz\fR.\fP"
66 See below for a description of where
68 looks for the manual page files.
72 .B \-\^C " config_file"
73 Specify the configuration file to use; the default is
74 .BR /usr/share/misc/man.conf .
79 Specify the list of directories to search for man pages.
80 Separate the directories with colons. An empty list is the same as
84 .BR "SEARCH PATH FOR MANUAL PAGES" .
87 Specify which pager to use.
88 This option overrides the
90 environment variable, which in turn overrides the
95 .BR "/usr/bin/less -is" .
97 .B \-\^S " section_list"
98 List is a colon separated list of manual sections to search.
99 This option overrides the
101 environment variable.
106 will exit after displaying the first manual page it
107 finds. Using this option forces
109 to display all the manual pages that match
114 Reformat the source man page, even when an up-to-date cat page exists.
115 This can be meaningful if the cat page was formatted for a screen
116 with a different number of columns, or if the preformatted page
120 Don't actually display the man pages, but do print gobs of debugging
124 Both display and print debugging info.
130 .BR \-\^F " or " \-\-preformat
131 Format only - do not display.
134 Print a one-line help message and exit.
141 Search for the specified string in *all* man pages. Warning: this is
142 probably very slow! It helps to specify a section.
143 (Just to give a rough idea, on my machine this takes about a minute
147 Specify an alternate set of man pages to search based on the system
151 Specify the sequence of preprocessors to run before
155 Not all installations will have a full set of preprocessors.
156 Some of the preprocessors and the letters used to designate them are:
157 eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r).
158 This option overrides the
160 environment variable.
164 .B /usr/bin/groff -Tps -mandoc
165 to format the manual page, passing the output to
168 .B /usr/bin/groff -Tps -mandoc
169 may need to be passed through some filter or another before being
172 .B \-\^w \fRor\fP \-\-path
173 Don't actually display the man pages, but do print the location(s) of
174 the files that would be formatted or displayed. If no argument is given:
175 display (on stdout) the list of directories that is searched by
179 is a link to man, then "manpath" is equivalent to "man --path".
182 Like \-\^w, but print file names one per line, without additional information.
183 This is useful in shell commands like
185 .B "man -aW man | xargs ls -l"
189 Man will try to save the formatted man pages, in order to save
190 formatting time the next time these pages are needed.
191 Traditionally, formatted versions of pages in DIR/manX are
192 saved in DIR/catX, but other mappings from man dir to cat dir
194 .BR /usr/share/misc/man.conf .
195 No cat pages are saved when the required cat directory does not exist.
196 No cat pages are saved when they are formatted for a line length
198 No cat pages are saved when man.conf contains the line NOCACHE.
200 It is possible to make
202 suid to a user man. Then, if a cat directory
203 has owner man and mode 0755 (only writable by man), and the cat files
204 have owner man and mode 0644 or 0444 (only writable by man, or not
205 writable at all), no ordinary user can change the cat pages or put
206 other files in the cat directory. If
208 is not made suid, then a cat directory should have mode 0777
209 if all users should be able to leave cat pages there.
213 forces reformatting a page, even if a recent cat page exists.
216 .SH "SEARCH PATH FOR MANUAL PAGES"
218 uses a sophisticated method of finding manual page files, based on the
219 invocation options and environment variables, the
220 .B /usr/share/misc/man.conf
221 configuration file, and some built in conventions and heuristics.
223 First of all, when the
230 assumes it is a file specification itself,
231 and there is no searching involved.
233 But in the normal case where
235 doesn't contain a slash,
237 searches a variety of directories for a file that could be a manual page
244 is a colon-separated list of the directories that
252 environment variable, the value of that variable is the list of the
257 If you don't specify an explicit path list with
262 develops its own path list based on the contents of the configuration
264 .BR /usr/share/misc/man.conf .
267 statements in the configuration file identify particular directories to
268 include in the search path.
272 statements add to the search path depending on your command search path
275 environment variable). For each directory that may be in the command
278 statement specifies a directory that should be added to the search
279 path for manual page files.
283 variable and adds the corresponding directories to the manual page
284 file search path. Thus, with the proper use of
286 when you issue the command
288 you get a manual page for the program that would run if you issued the
292 In addition, for each directory in the command search path (we'll call
293 it a "command directory") for which you do
299 automatically looks for a manual page directory "nearby"
300 namely as a subdirectory in the command directory itself or
301 in the parent directory of the command directory.
303 You can disable the automatic "nearby" searches by including a
306 .BR /usr/share/misc/man.conf .
308 In each directory in the search path as described above,
310 searches for a file named
311 .IB topic . section\fR,
312 with an optional suffix on the section number and
313 possibly a compression suffix.
314 If it doesn't find such a file, it then looks in any subdirectories
321 is the manual section number.
326 assumes it is a formatted manual page file (cat page). Otherwise,
328 assumes it is unformatted. In either case, if the filename has a
329 known compression suffix (like
332 assumes it is gzipped.
334 If you want to see where (or if)
336 would find the manual page for a particular topic, use the
347 uses it as the path to search for manual page files. It overrides the
348 configuration file and the automatic search path, but is overridden by
351 invocation option. See
352 .BR "SEARCH PATH FOR MANUAL PAGES" .
357 is set, its value is used as the display page length.
358 Otherwise, the entire man page will occupy one (long) page.
363 is set, its value is used to determine the set of preprocessors run
368 By default, pages are passed through
369 the tbl preprocessor before
375 is set, its value is used to determine which manual sections to search.
380 is set, its value is used as the width manpages should be displayed.
381 Otherwise the pages may be displayed over the whole width of your
387 is set, its value is used as the name of the program to use to display
388 the man page. If not, then
390 is used. If that has no value either,
397 is set, its value defines the name of the subdirectory where man
398 first looks for man pages. Thus, the command `LANG=dk man 1 foo'
399 will cause man to look for the foo man page in .../dk/man1/foo.1,
400 and if it cannot find such a file, then in .../man1/foo.1,
401 where ... is a directory on the search path.
403 .B "NLSPATH, LC_MESSAGES, LANG"
404 The environment variables
410 when the latter does not exist)
411 play a role in locating the message catalog.
412 (But the English messages are compiled in, and for English no catalog
414 Note that programs like
416 called by man also use e.g. LC_CTYPE.
420 helps determine the search path for manual page files. See
421 .BR "SEARCH PATH FOR MANUAL PAGES" .
425 is used to get the default alternate system name (for use
430 apropos(1), whatis(1), less(1), groff(1), man.conf(5).
434 option only works if a troff-like program is installed.
436 If you see blinking \e255 or <AD> instead of hyphens,
437 put `LESSCHARSET=latin1' in your environment.
441 (global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
445 file, then hitting F1 will give you the man page for the library call
446 at the current cursor position.
448 To get a plain text version of a man page, without backspaces
451 # man foo | col -b > foo.mantxt