|WHICH(1)||General Commands Manual||WHICH(1)|
which — locate a
program file (or files) in the path
which takes a list of names and looks for
the files which would be executed had these names been given as commands.
Each argument is searched for along the user's path.
-a flag is given,
which will return a list of all matches instead of
just the first match.
The following environment variables affect the execution of
PATHis not set or is empty,
whichwill use the system's default search path.
which utility exits with one of the
A diagnostic is given if an executable file with the argument name was not found in the path.
which also exists as a built-in to
csh(1), though with a different syntax.
which command first appeared in
-a option first appeared in
|January 14, 2016||OpenBSD-current|