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