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

Synopsis

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

Description

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.

Note

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

Bugs

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.