xref: /netbsd-src/usr.bin/whereis/whereis.1 (revision 2a65137f552b06844d6d4647074580ad3b40d634)
1*2a65137fSwiz.\"	$NetBSD: whereis.1,v 1.15 2014/09/19 16:02:59 wiz Exp $
2be667101Sjtc.\"
3dd831dd1Smycroft.\" Copyright (c) 1993
4dd831dd1Smycroft.\"	The Regents of the University of California.  All rights reserved.
561f28255Scgd.\"
661f28255Scgd.\" Redistribution and use in source and binary forms, with or without
761f28255Scgd.\" modification, are permitted provided that the following conditions
861f28255Scgd.\" are met:
961f28255Scgd.\" 1. Redistributions of source code must retain the above copyright
1061f28255Scgd.\"    notice, this list of conditions and the following disclaimer.
1161f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
1261f28255Scgd.\"    notice, this list of conditions and the following disclaimer in the
1361f28255Scgd.\"    documentation and/or other materials provided with the distribution.
1489aaa1bbSagc.\" 3. Neither the name of the University nor the names of its contributors
1561f28255Scgd.\"    may be used to endorse or promote products derived from this software
1661f28255Scgd.\"    without specific prior written permission.
1761f28255Scgd.\"
1861f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1961f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2061f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2161f28255Scgd.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2261f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2361f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2461f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2561f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2661f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2761f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2861f28255Scgd.\" SUCH DAMAGE.
2961f28255Scgd.\"
30be667101Sjtc.\"	@(#)whereis.1	8.3 (Berkeley) 4/27/95
3161f28255Scgd.\"
32df28067fSperry.Dd April 3, 2003
3361f28255Scgd.Dt WHEREIS 1
349e44e9b5Sgarbled.Os
3561f28255Scgd.Sh NAME
3661f28255Scgd.Nm whereis
37dd831dd1Smycroft.Nd locate programs
3861f28255Scgd.Sh SYNOPSIS
39e47862a2Slukem.Nm
4064b15518Sfair.Op Fl p
4164b15518Sfair.Ar program
42dd831dd1Smycroft.Op Ar program ...
4361f28255Scgd.Sh DESCRIPTION
44dd831dd1SmycroftThe
459998247bSmrg.Nm
46dd831dd1Smycroftutility checks the standard binary directories for the specified programs,
47dd831dd1Smycroftprinting out the paths of any it finds.
4861f28255Scgd.Pp
4964b15518SfairThe default path searched is the string returned by the
50dd831dd1Smycroft.Xr sysctl 8
51dd831dd1Smycroftutility for the
52dd831dd1Smycroft.Dq user.cs_path
53dd831dd1Smycroftstring.
5464b15518SfairIf the
5564b15518Sfair.Op Fl p
5664b15518Sfairoption is specified, then the value of the environment
5764b15518Sfairvariable
5864b15518Sfair.Ev PATH
5964b15518Sfairis used instead.
60df28067fSperry.Sh EXIT STATUS
61df28067fSperryThe
62df28067fSperry.Nm
63df28067fSperryutility exits 0 on success, 1 on general error, 2 if only some
64df28067fSperryprograms were located and 3 if none were.
65dd831dd1Smycroft.Sh COMPATIBILITY
66dd831dd1SmycroftThe historic flags and arguments for the
679998247bSmrg.Nm
68dd831dd1Smycroftutility are no longer available in this version.
69*2a65137fSwiz.Sh SEE ALSO
70*2a65137fSwiz.Xr whatis 1 ,
71*2a65137fSwiz.Xr which 1 ,
72*2a65137fSwiz.Xr sysctl 8
7361f28255Scgd.Sh HISTORY
7461f28255ScgdThe
759998247bSmrg.Nm
7634a98169Sperrycommand appeared in
7734a98169Sperry.Bx 3.0 .
78