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