HP-UX Reference (11i v1 00/12) - 1 User Commands N-Z (vol 2)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/neqn.1
________________________________________________________________
___ ___
w
which(1) which(1)
NAME
which - locate a program file including aliases and paths
SYNOPSIS
which [name ...]
DESCRIPTION
For each name given, which searches for the file that would be executed if name were given as a com-
mand, and displays the absolute path of that file. Each argument is expanded if it is aliased, and searched
for along the user’s path. Both aliases and path are determined by sourcing (executing) the user’s .cshrc
file.
DIAGNOSTICS
A diagnostic is given for names that are aliased to more than a single word, or if an executable le with the
argument name was not found in the path.
EXAMPLES
The command:
which sh
specifies where the executable program of the sh(1) command is found. For example, the response might
be:
/usr/bin/sh
if the sh(1) being used is located in /usr/bin.
WARNINGS
which reports .cshrc aliases even when not invoked from csh.
which cannot find csh built-in commands (e.g. jobs).
which’s information may be incorrect because it is unaware of any path or alias changes that have
occurred in the current shell session.
AUTHOR
which was developed by the University of California, Berkeley.
FILES
˜/.cshrc source of aliasesand path values
HP-UX Release 11i: December 2000 1 Section 11013
___
___