gno/usr.bin/whereis/whereis.1
1996-01-27 22:38:42 +00:00

134 lines
2.2 KiB
Groff

.\" @(#)whereis.1 1.17 90/02/15 SMI; from UCB 4.2
.TH WHEREIS 1 "Commands and Applications" "2 January 1994" "Orca/Gno Version 1.1"
.SH NAME
whereis \- locate the binary, source, and manual page files for a command
.SH SYNOPSIS
.B whereis
[
.B \-bcmsuV
] [
.B \-BMS
.IR directory .\|.\|.
.B \-f
]
\fIfilename\fP\|
.SH DESCRIPTION
.B whereis
locates source/binary and manuals sections for specified
files.
The supplied names are first stripped of leading pathname components
and any (single) trailing extension of the form
.BR .ext ,
for example,
.BR .c .
Prefixes of
.B s.
resulting from use of source code control are also dealt with.
.B whereis
then attempts to locate the desired program in
a list of standard places:
.RS
.nf
/bin
/usr/bin
/usr/sbin
/usr/games
/usr/include
/usr/hosts
/usr/local
/usr/local/bin
/etc
/man (disabled)
/usr/man
/usr/src/bin
/usr/src/etc
17/
17/help
.fi
.RE
.SH OPTIONS
.B \-b
Search only for binaries.
.LP
.B \-c
Make the search case\-insensitive.
.LP
.B \-f
Terminate the last directory list and signals the start of file names,
and
.I must
be used when any of the
.BR \-B ,
.BR \-M ,
or
.B \-S
options are used.
.LP
.B \-m
Search only for manual sections.
.LP
.B \-s
Search only for sources.
.LP
.B \-u
Search for unusual entries. A file is said to be unusual if it does
not have one entry of each requested type. Therefore
.B "whereis -m -u *"
asks for those files in the current
directory which have no documentation.
.LP
.B \-B
Change or otherwise limit the places where
.B whereis
searches for binaries.
.LP
.B \-M
Change or otherwise limit the places where
.B whereis
searches for
manual sections.
.LP
.B \-S
Change or otherwise limit the places where
.B whereis
searches for sources.
.LP
.B \-V
Print version information.
.SH EXAMPLE
Find all files in
.B /usr/bin
which are not documented
in
.B /usr/share/man/man1
with source in
.BR /usr/src/cmd :
.RS
.nf
example% cd /usr/ucb
example% whereis \-u \-M /usr/share/man/man1 \-S /usr/src/cmd \-f *
.fi
.RE
.SH FILES
.nf
/usr/src/*
/usr/{doc,man}/*
/usr/{lib,bin,ucb,old,new,local}
/etc
.fi
.SH SEE ALSO
.BR chdir (2V)
.SH BUGS
Since
.B whereis
uses
.BR chdir (2V)
to run faster, pathnames given with the
.BR \-M ,
.BR \-S ,
or
.B \-B
must be full; that is, they must begin with a
.BR / .