The command takes one or more arguments; for each of these arguments, it prints the full path of the executable to stdout that would have been executed if this argument had been entered into the shell. It does this by searching for an executable or script in the directories listed in the environment variable PATH. The which command is part of most Unix-like computers. It is also part of the C Shell, and is available as a separate package for Microsoft Windows or use the similar
where.exe. The same functionality is available in MS-DOS, but not Windows, as the built-in TRUENAME command.
- "Command", The Open group base specification, Issue 7, IEEE std 1003.1-2008
whichfor Windows from the GnuWin32 project