Commit | Line | Data |
---|---|---|
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 | |
10 | whereis \- 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 | |
19 | dir ... | |
20 | .B \-f | |
21 | ] name ... | |
22 | .SH DESCRIPTION | |
23 | .I Whereis | |
24 | locates source/binary and manuals sections for specified files. | |
25 | The supplied names are first stripped of leading pathname components | |
26 | and any (single) trailing extension of the form ``.ext'', e.g. ``.c''. | |
27 | Prefixes of ``s.'' resulting from use of source code control are also | |
28 | dealt with. | |
29 | .I Whereis | |
30 | then attempts to locate the desired program in a list of standard places. | |
31 | If any of the | |
32 | .B \-b, | |
33 | .B \-s | |
34 | or | |
35 | .B \-m | |
36 | flags are given then | |
37 | .I whereis | |
38 | searches only for binaries, sources or manual sections respectively | |
39 | (or any two thereof). | |
40 | The | |
41 | .B \-u | |
42 | flag may be used to search for unusual entries. | |
43 | A file is said to be unusual if it does not have one entry of | |
44 | each requested type. | |
45 | Thus ``whereis -m -u *'' asks for those files in the current | |
46 | directory which have no documentation. | |
47 | .sp | |
48 | Finally, the | |
49 | .B \-B | |
50 | .B \-M | |
51 | and | |
52 | .B \-S | |
53 | flags may be used to change or otherwise limit the places where | |
54 | .I whereis | |
55 | searches. | |
56 | The | |
57 | .B \-f | |
58 | file flags is used to terminate the last such directory list | |
59 | and signal the start of file names. | |
60 | .SH EXAMPLE | |
61 | The following finds all the files in /usr/bin which are not documented | |
62 | in /usr/man/man1 with source in /usr/src/cmd: | |
63 | .IP | |
64 | cd /usr/ucb | |
65 | .br | |
66 | whereis \-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 |
74 | Since the program uses | |
75 | .IR chdir (2) | |
76 | to run faster, pathnames given with the | |
77 | .B \-M | |
78 | .B \-S | |
79 | and | |
80 | .B \-B | |
81 | must be full; i.e. they must begin with a ``/''. |