0% found this document useful (0 votes)
7 views2 pages

Manual Page Search Options Explained

The document outlines various command-line options for the 'man' command, which is used to display manual pages. Key options include specifying sections to search, handling sub-extensions for manual pages, and searching with case sensitivity or regular expressions. Additional options allow for displaying all matching pages, updating the manual page database, and controlling the interpretation of manual page names with subcommands.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Manual Page Search Options Explained

The document outlines various command-line options for the 'man' command, which is used to display manual pages. Key options include specifying sections to search, handling sub-extensions for manual pages, and searching with case sensitivity or regular expressions. Additional options allow for displaying all matching pages, updating the manual page database, and controlling the interpretation of manual page names with subcommands.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

tions=list

The given list is a colon- or comma-separated list of sections,


used to determine which manual sections to search and in what
order. This option overrides the $MANSECT environment variable.
(The -s spelling is for compatibility with System V.)

-e sub-extension, --extension=sub-extension
Some systems incorporate large packages of manual pages, such as
those that accompany the Tcl package, into the main manual page
hierarchy. To get around the problem of having two manual pages
with the same name such as exit(3), the Tcl pages were usually
all assigned to section l. As this is unfortunate, it is now
possible to put the pages in the correct section, and to assign
a specific "extension" to them, in this case, exit(3tcl). Under
normal operation, man will display exit(3) in preference to
exit(3tcl). To negotiate this situation and to avoid having to
know which section the page you require resides in, it is now
possible to give man a sub-extension string indicating which
package the page must belong to. Using the above example, sup‐
plying the option -e tcl to man will restrict the search to
pages having an extension of *tcl.

-i, --ignore-case
Ignore case when searching for manual pages. This is the de‐
fault.

-I, --match-case
Search for manual pages case-sensitively.

--regex
Show all pages with any part of either their names or their de‐
scriptions matching each page argument as a regular expression,
as with apropos(1). Since there is usually no reasonable way to
pick a "best" page when searching for a regular expression, this
option implies -a.

--wildcard
Show all pages with any part of either their names or their de‐
scriptions matching each page argument using shell-style wild‐
cards, as with apropos(1) --wildcard. The page argument must
match the entire name or description, or match on word bound‐
aries in the description. Since there is usually no reasonable
way to pick a "best" page when searching for a wildcard, this
option implies -a.

--names-only
If the --regex or --wildcard option is used, match only page
names, not page descriptions, as with whatis(1). Otherwise, no
effect.

-a, --all
By default, man will exit after displaying the most suitable
manual page it finds. Using this option forces man to display
all the manual pages with names that match the search criteria.

-u, --update
This option causes man to update its database caches of in‐
stalled manual pages. This is only needed in rare situations,
and it is normally better to run mandb(8) instead.
--no-subpages
By default, man will try to interpret pairs of manual page names
given on the command line as equivalent to a single manual page
name containing a hyphen or an underscore. This supports the
common pattern of programs that implement a number of subcom‐
mands, allowing them to provide manual pages for each that can
be accessed using similar syntax as would be used to invoke the
subcommands themselves. For example:

$ man -aw git diff


/usr/share/man/man1/[Link]

To disable this behaviour, use the --no-su

You might also like