BSD 3 development
[unix-history] / usr / man / man1 / whereis.1
CommitLineData
d8c2c8ed
BJ
1.TH WHEREIS 1 2/24/79
2.UC
3.SH NAME
4whereis \- locate source, binary, and or manual for program
5.SH SYNOPSIS
6.B whereis
7[
8.B \-sbm
9] [
10.B \-u
11] [
12.B \-SBM
13dir ...
14.B \-f
15] name ...
16.SH DESCRIPTION
17.I Whereis
18locates source/binary and manuals sections for specified files.
19The supplied names are first stripped of leading pathname components
20and any (single) trailing extension of the form ``.ext'', e.g. ``.c''.
21Prefixes of ``s.'' resulting from use of source code control are also
22dealt with.
23.I Whereis
24then attempts to locate the desired program in a list of standard places.
25If any of the
26.B \-b,
27.B \-s
28or
29.B \-m
30flags are given then
31.I whereis
32searches only for binaries, sources or manual sections respectively
33(or any two thereof).
34The
35.B \-u
36flag may be used to search for unusual entries.
37A file is said to be unusual if it does not have one entry of
38each requested type.
39Thus ``whereis -m -u *'' asks for those files in the current
40directory which have no documentation.
41.sp
42Finally, the
43.B \-B
44.B \-M
45and
46.B \-S
47flags may be used to change or otherwise limit the places where
48.I whereis
49searches.
50The
51.B \-f
52file flags is used to terminate the last such directory list
53and signal the start of file names.
54.SH EXAMPLE
55The following finds all the files in /usr/bin which are not documented
56in /usr/man/man1 with source in /usr/src/cmd:
57.IP
58cd /usr/ucb
59.br
60whereis \-u \-M /usr/man/man1 \-S /usr/src/cmd \-f *
61.SH FILES
62/usr/src/*
63.br
64/usr/{doc,man}/*
65.br
66/lib, /etc, /usr/{lib,bin,ucb,old,new,local}
67.SH AUTHOR
68William Joy
69.SH BUGS
70Since the program uses
71.IR chdir (2)
72to run faster, pathnames given with the
73.B \-M
74.B \-S
75and
76.B \-B
77must be full; i.e. they must begin with a ``/''.