Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" @(#)whereis.1 6.5 (Berkeley) 4/23/91 | |
33 | .\" | |
34 | .Dd April 23, 1991 | |
35 | .Dt WHEREIS 1 | |
36 | .Os BSD 3 | |
37 | .Sh NAME | |
38 | .Nm whereis | |
39 | .Nd locate binary, manual, and or source for program | |
40 | .Sh SYNOPSIS | |
41 | .Nm whereis | |
42 | .Op Fl bms | |
43 | .Op Fl u | |
44 | .Op Fl BMS Ar dir Ar ... Fl f | |
45 | .Ar name Ar ... | |
46 | .Sh DESCRIPTION | |
47 | .Nm Whereis | |
48 | locates source/binary and manuals sections for specified files. | |
49 | The supplied names are first stripped of leading pathname components | |
50 | and of any (single) trailing extension of the form | |
51 | .Ql .ext , | |
52 | e.g. | |
53 | .Ql \&.c . | |
54 | Prefixes of | |
55 | .Ql \&.s | |
56 | resulting from use of source code control are also | |
57 | dealt with. | |
58 | .Nm Whereis | |
59 | then attempts to locate the desired program in a list of standard places. | |
60 | .Pp | |
61 | Available options: | |
62 | .Bl -tag -width Ds | |
63 | .It Fl B | |
64 | Change or limit directories searched for binaries. Requires the | |
65 | .Fl f | |
66 | flag. | |
67 | .It Fl M | |
68 | Change or limit directories searched for manual entries. Requires the | |
69 | .Fl f | |
70 | flag. | |
71 | .It Fl S | |
72 | Change or limit directories searched for source. Requires the | |
73 | .Fl f | |
74 | flag. | |
75 | .It Fl b | |
76 | Search for binaries. | |
77 | .It Fl f | |
78 | Signals the end of a directory list specified by one or more of the | |
79 | .Fl B , M | |
80 | or | |
81 | .Fl S | |
82 | options and the start of file | |
83 | .Ar names . | |
84 | .It Fl m | |
85 | Search for manual entries. | |
86 | .It Fl s | |
87 | Search for source. | |
88 | .It Fl u | |
89 | Search for unusual entries. | |
90 | A file is said to be unusual if it does not have one entry of | |
91 | each requested type. | |
92 | Thus: | |
93 | .Pp | |
94 | .Dl whereis -m -u * | |
95 | .Pp | |
96 | asks for those files in the current | |
97 | directory which have no documentation. | |
98 | .El | |
99 | .Sh EXAMPLE | |
100 | The following finds all the files in | |
101 | .Pa /usr/bin | |
102 | which are not documented | |
103 | in | |
104 | .Pa /usr/share/man/man1 | |
105 | with source in | |
106 | .Pa /usr/src/cmd: | |
107 | .Bd -literal -offset indent -compact | |
108 | cd /usr/ucb | |
109 | whereis \-u \-M /usr/share/man/man1 \-S /usr/src/cmd \-f * | |
110 | .Ed | |
111 | .Sh FILES | |
112 | .Bl -tag -width /lib,x/etc,x/usr/{lib,bin,ucb,old,new,local} -compact | |
113 | .It Pa /usr/src/* | |
114 | .It Pa /usr/{doc,man}/* | |
115 | .It Pa /lib, /etc, /usr/{lib,bin,ucb,old,new,local} | |
116 | .El | |
117 | .Sh BUGS | |
118 | Since the program uses | |
119 | .Xr chdir 2 | |
120 | to run faster, pathnames given with the | |
121 | .Fl M | |
122 | .Fl S | |
123 | and | |
124 | .Fl B | |
125 | must be full; i.e. they must begin with a | |
126 | .Ql \&/ . | |
127 | .Sh HISTORY | |
128 | The | |
129 | .Nm | |
130 | command appeared in | |
131 | .Bx 3.0 . |