Home OS X
OS X Syntax

which

Locate a program file in the user's path

SYNTAX
      which command ...

Display the command that will be executed by the shell after substitutions, path searching, etc.

The builtin command is just like which(1), but it correctly reports tcsh aliases and builtins and is 10 to 100 times faster.

"God shows his contempt for wealth by the kind of person he selects to receive it" - Austin O'Malley

Related commands:

find - Search for files that meet a desired criteria
grep - Search file(s) for lines that match a given pattern
ls - List information about file(s)
locate - Find files
where - Report all known instances of a command

Equivalent BASH command:

which - Locate a program file in the user's path.



Back to the Top

Simon Sheppard
SS64.com