whereis.1 (c44252b6e8da46f58fd1882b9e7305a0f9114c16) | whereis.1 (41cbb62401042edaef677195f4d4c1e51a816ed9) |
---|---|
1.\" Copyright (c) 1993 2.\" The Regents of the University of California. 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. --- 15 unchanged lines hidden (view full) --- 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.\" | 1.\" Copyright (c) 1993 2.\" The Regents of the University of California. 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. --- 15 unchanged lines hidden (view full) --- 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 8.3 (Berkeley) 4/27/95 | 32.\" @(#)whereis.1 8.2 (Berkeley) 12/30/93 |
33.\" | 33.\" |
34.Dd April 27, 1995 | 34.\" $Id: whereis.1,v 1.4 1997/02/22 19:57:47 peter Exp $ 35.\" 36.Dd June 15, 1996 |
35.Dt WHEREIS 1 | 37.Dt WHEREIS 1 |
36.Os BSD 3 | 38.Os FreeBSD |
37.Sh NAME 38.Nm whereis 39.Nd locate programs 40.Sh SYNOPSIS 41.Nm whereis | 39.Sh NAME 40.Nm whereis 41.Nd locate programs 42.Sh SYNOPSIS 43.Nm whereis |
42.Op Ar program ... | 44.Op Fl bms 45.Op Fl u 46.Op Fl BMS dir ... Fl f 47.Ar program ... |
43.Sh DESCRIPTION 44The 45.Nm whereis | 48.Sh DESCRIPTION 49The 50.Nm whereis |
46utility checks the standard binary directories for the specified programs, 47printing out the paths of any it finds. | 51utility checks the standard binary, manual page, and source 52directories for the specified programs, printing out the paths of any 53it finds. The supplied names are first stripped of leading path name 54components, any single trailing extension of the form 55.Ql .ext , 56and the leading 57.Ql s. 58or trailing 59.Ql ,v 60from a source code control system. |
48.Pp | 61.Pp |
49The path searched is the string returned by the | 62The default path searched is the string returned by the |
50.Xr sysctl 8 51utility for the 52.Dq user.cs_path | 63.Xr sysctl 8 64utility for the 65.Dq user.cs_path |
53string. | 66string, with 67.Pa /usr/libexec 68and the current user's 69.Ev $PATH 70appended. Manual pages are searched by default along the 71.Ev $MANPATH . 72Program sources are located in a list of known standard places, 73including all the subdirectories of 74.Pa /usr/src 75and 76.Pa /usr/ports . 77.Pp 78The following options are available: 79.Bl -tag -width indent 80.It Fl B 81Specify directories to search for binaries. Requires the 82.Fl f 83option. 84.It Fl M 85Specify directories to search for manual pages. Requires the 86.Fl f 87option. 88.It Fl S 89Specify directories to search for program sources. Requires the 90.Fl f 91option. 92.It Fl b 93Search for binaries. 94.It Fl f 95Delimits the list of directories after the 96.Fl B , 97.Fl M , 98or 99.Fl S 100options, and indicates the beginning of the 101.Ar name 102list. 103.It Fl m 104Search for manual pages. 105.It Fl s 106Search for source directories. 107.It Fl u 108Search for 109.Dq unusual 110entries. A file is said to be unusual if it does not have one entry 111of each requested type. 112.El 113.Sh EXAMPLE 114The following finds all utilities under 115.Pa /usr/bin 116that do not have documentation: 117.Dl whereis -m -u /usr/bin/* |
54.Sh SEE ALSO | 118.Sh SEE ALSO |
119.Xr find 1 , 120.Xr locate 1 , 121.Xr which 1 , 122.Xr man 1 , |
|
55.Xr sysctl 8 | 123.Xr sysctl 8 |
56.Sh COMPATIBILITY 57The historic flags and arguments for the 58.Nm whereis 59utility are no longer available in this version. | 124.Sh BUGS 125The search for sources is implemented as a quick search as the 126first-level subdirectory of each element of the list of source 127directories first. If this didn't succeed, the utility 128.Xr locate 1 129is requested to do the search in deeper nested subdirectories. This 130might take some time, and will only succeed if the locate database is 131up-to-date. |
60.Sh HISTORY 61The 62.Nm whereis | 132.Sh HISTORY 133The 134.Nm whereis |
63command appeared in 3.0BSD. | 135command appeared in 136.Bx 3.0 . 137This version re-implements the historical 138functionality that was lost in 139.Bx 4.4 . |