xref: /original-bsd/old/which/which.1 (revision a6d4d8bb)
1.\" Copyright (c) 1980, 1991 Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)which.1	6.3 (Berkeley) 04/23/91
7.\"
8.Dd
9.Dt WHICH 1
10.Os BSD 3
11.Sh NAME
12.Nm which
13.Nd "locate a program file including aliases and paths"
14.Pq Xr csh 1
15only)
16.Sh SYNOPSIS
17.Nm which
18.Op Ar name
19.Ar ...
20.Sh DESCRIPTION
21.Nm Which
22takes a list of names and looks for the files which would be
23executed had these names been given as commands.
24Each argument is expanded if it is aliased,
25and searched for along the user's path.
26Both aliases and path are taken from the user's
27.Pa \&.cshrc
28file.
29.Sh FILES
30.Bl -tag -width ~/\&.cshrc
31.It Pa ~/\&.cshrc
32source of aliases and path values
33.El
34.Sh DIAGNOSTICS
35A diagnostic is given for names which are aliased to more than a single
36word,
37or if an executable file with the argument name was not found in the path.
38.Sh BUGS
39Must be executed by a
40.Xr csh 1 ,
41or some other shell which knows about aliases.
42.Sh HISTORY
43The
44.Nm
45command appeared in
46.Bx 3.0 .
47