version 1.2, 2011/10/08 12:24:40 |
version 1.3, 2011/11/09 10:53:48 |
|
|
.Nd search the manual page database |
.Nd search the manual page database |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm |
.Nm |
.Op Fl eIr |
.Op Fl I |
.Op Fl a Ar arch |
.Op Fl S Ar arch |
.Op Fl c Ar cat |
.Op Fl s Ar section |
.Op Fl s Ar sort |
|
.Op Fl t Ar types |
.Op Fl t Ar types |
.Ar key |
.Ar pattern |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
The |
The |
.Nm |
.Nm |
utility queries the manual page database. |
utility queries the manual page database. |
Its arguments are as follows: |
Its arguments are as follows: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It Fl a Ar arch |
.It Fl S Ar arch |
Search only for a particular architecture. |
Search only for a particular architecture. |
.It Fl c Ar cat |
.It Fl s Ar cat |
Search only for a category (manual section). |
Search only for a manual section. |
See |
See |
.Xr man 1 |
.Xr man 1 |
for a listing of categories. |
for a listing of manual sections. |
.It Fl e |
|
Search only for exact matches (subject to |
|
.Fl I ) . |
|
.It Fl I |
.It Fl I |
Case-insensitive matching. |
Case-insensitive pattern matching. |
.It Fl r |
|
Consider |
|
.Ar key |
|
to be a POSIX regular expression (subject to |
|
.Fl I ) . |
|
See |
|
.Xr re_format 7 |
|
for a description of regular expressions. |
|
.It Fl s Ar sort |
|
Sorting type. |
|
Accepts |
|
.Ar cat |
|
to sort by category and then by title or |
|
.Ar title |
|
to sort by title (which is the default). |
|
.It Fl t Ar types |
.It Fl t Ar types |
Consider only types of keyword match, where |
Consider only types of keyword match, where |
.Ar types |
.Ar types |
|
|
.Pp |
.Pp |
By default, |
By default, |
.Nm |
.Nm |
searches for substring matches of |
searches for pattern matches of |
.Ar key |
.Ar pattern |
in manual names and descriptions |
in manual names and descriptions |
and displays results by manual title. |
and displays results sorted by manual title. |
Output is formatted as |
Output is formatted as |
.Pp |
.Pp |
.D1 title(cat) \- description |
.D1 title(sec) \- description |
.Pp |
.Pp |
Where |
Where |
.Qq title |
.Qq title |
is the manual's title (note multiple manual names may exist for one |
is the manual's title (note multiple manual names may exist for one |
title), |
title), |
.Qq cat |
.Qq sec |
is the category, and |
is the manual section, and |
.Qq description |
.Qq description |
is the manual's short description. |
is the manual's short description. |
If an architecture is specified for the manual, it is displayed as |
If an architecture is specified for the manual, it is displayed as |
Line 122 If an architecture is specified for the manual, it is |
|
Line 103 If an architecture is specified for the manual, it is |
|
.Pp |
.Pp |
Resulting manuals may be accessed as |
Resulting manuals may be accessed as |
.Pp |
.Pp |
.Dl $ man -s cat title |
.Dl $ man \-s sec title |
.Pp |
.Pp |
If an architecture is specified in the output, use |
If an architecture is specified in the output, use |
.Pp |
.Pp |
.Dl $ man -s cat -S arch title |
.Dl $ man \-s sec \-S arch title |
.\" .Sh IMPLEMENTATION NOTES |
.\" .Sh IMPLEMENTATION NOTES |
.\" Not used in OpenBSD. |
.\" Not used in OpenBSD. |
.\" .Sh RETURN VALUES |
.\" .Sh RETURN VALUES |
|
|
.Qq optind |
.Qq optind |
as a variable name in the library category: |
as a variable name in the library category: |
.Pp |
.Pp |
.Dl $ apropos -tvar -c 3 optind |
.Dl $ apropos \-tvar \-s 3 optind |
.Pp |
.Pp |
Search for all manuals referencing the term |
Search for all manuals referencing the term |
.Qq POSIX |
.Qq POSIX |
in any letter case: |
in any letter case: |
.Pp |
.Pp |
.Dl $ apropos -tall -I posix |
.Dl $ apropos \-tall \-I posix |
.\" .Sh DIAGNOSTICS |
.\" .Sh DIAGNOSTICS |
.\" For sections 1, 4, 6, 7, & 8 only. |
.\" For sections 1, 4, 6, 7, & 8 only. |
.\" .Sh ERRORS |
.\" .Sh ERRORS |