Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / which / which.1
1 .\" Manpage Copyright (c) 1995, Jordan Hubbard <jkh@FreeBSD.org>
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\"    notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\"    notice, this list of conditions and the following disclaimer in the
10 .\"    documentation and/or other materials provided with the distribution.
11 .\" 3. All advertising materials mentioning features or use of this software
12 .\"    must display the following acknowledgement:
13 .\"      This product includes software developed by the FreeBSD Project
14 .\"      its contributors.
15 .\" 4. Neither the name of the FreeBSD Project nor the names of its contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTOR ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 .\"
30 .\" $FreeBSD: src/usr.bin/which/which.1,v 1.16.2.4 2002/06/21 15:30:13 charnier Exp $
31 .\" $DragonFly: src/usr.bin/which/which.1,v 1.2 2003/06/17 04:29:33 dillon Exp $
32 .Dd January 26, 1995
33 .Dt WHICH 1
34 .Os
35 .Sh NAME
36 .Nm which
37 .Nd "locate a program file in the user's path"
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl as
41 .Op Ar command
42 .Ar ...
43 .Sh DESCRIPTION
44 The
45 .Nm
46 utility
47 takes a list of command names and searches the path for each executable
48 file that would be run had these commands actually been invoked.
49 .Pp
50 The following options are available:
51 .Bl -tag -width indent
52 .It Fl a
53 List all instances of executables found (instead of just the first one
54 of each).
55 .It Fl s
56 No output, just return 0 if any of the executables are found, or 1 if
57 none are found.
58 .El
59 .Pp
60 Some shells may provide a builtin
61 .Nm
62 command which is similar or identical to this utility.
63 Consult the
64 .Xr builtin 1
65 manual page.
66 .Sh HISTORY
67 The
68 .Nm
69 command first appeared in
70 .Fx 2.1 .
71 .Sh SEE ALSO
72 .Xr builtin 1 ,
73 .Xr csh 1 ,
74 .Xr find 1 ,
75 .Xr locate 1 ,
76 .Xr perl 1 ,
77 .Xr whereis 1
78 .Sh AUTHORS
79 The PERL script for this more modern version of
80 .Nm
81 was written by
82 .An Wolfram Schneider Aq wosch@FreeBSD.org .