converted man page
[unix-history] / usr / src / old / whereis / whereis.1
CommitLineData
fcd79f54
KB
1.\" Copyright (c) 1980 The Regents of the University of California.
2.\" All rights reserved.
4736c214 3.\"
fcd79f54
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)whereis.1 6.3 (Berkeley) %G%
4736c214 17.\"
b9322152 18.TH WHEREIS 1 ""
4736c214
KM
19.UC
20.SH NAME
21whereis \- locate source, binary, and or manual for program
22.SH SYNOPSIS
23.B whereis
24[
25.B \-sbm
26] [
27.B \-u
28] [
29.B \-SBM
30dir ...
31.B \-f
32] name ...
33.SH DESCRIPTION
34.I Whereis
35locates source/binary and manuals sections for specified files.
36The supplied names are first stripped of leading pathname components
37and any (single) trailing extension of the form ``.ext'', e.g. ``.c''.
38Prefixes of ``s.'' resulting from use of source code control are also
39dealt with.
40.I Whereis
41then attempts to locate the desired program in a list of standard places.
42If any of the
43.B \-b,
44.B \-s
45or
46.B \-m
47flags are given then
48.I whereis
49searches only for binaries, sources or manual sections respectively
50(or any two thereof).
51The
52.B \-u
53flag may be used to search for unusual entries.
54A file is said to be unusual if it does not have one entry of
55each requested type.
56Thus ``whereis -m -u *'' asks for those files in the current
57directory which have no documentation.
58.sp
59Finally, the
60.B \-B
61.B \-M
62and
63.B \-S
64flags may be used to change or otherwise limit the places where
65.I whereis
66searches.
67The
68.B \-f
69file flags is used to terminate the last such directory list
70and signal the start of file names.
71.SH EXAMPLE
72The following finds all the files in /usr/bin which are not documented
73in /usr/man/man1 with source in /usr/src/cmd:
74.IP
75cd /usr/ucb
76.br
77whereis \-u \-M /usr/man/man1 \-S /usr/src/cmd \-f *
78.SH FILES
79/usr/src/*
80.br
81/usr/{doc,man}/*
82.br
83/lib, /etc, /usr/{lib,bin,ucb,old,new,local}
4736c214
KM
84.SH BUGS
85Since the program uses
86.IR chdir (2)
87to run faster, pathnames given with the
88.B \-M
89.B \-S
90and
91.B \-B
92must be full; i.e. they must begin with a ``/''.