which — Locate a Command; Display Its Path Name or Alias


/usr/bin/which [filename] ... 


which takes a list of names and looks for the files that would be executed had these names been given as commands. Each argument is expanded if it is aliased and is searched for along the user's path. Both aliases and path are taken from the user's .cshrc file.


which is not a shell built-in command; it is the UNIX command, /usr/bin/which.


Only aliases and paths from ~/.cshrc are used; importing from the current environment is not attempted. The which command must be executed by csh(1) because only csh knows about aliases.

To compensate for ~/.cshrc files in which aliases depend on the prompt variable being set, which sets ...

Get Solaris™ 7 Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.