Name
which
Synopsis
which [commands
]
Lists which files are executed if the named commands
are run as a command. which reads the user’s .cshrc file (using the source built-in command), checking aliases and searching the path
variable. Users of the Bourne or Korn shells can use the built-in type command as an alternative.
Example
$ which file ls
/usr/bin/file
ls: aliased to ls -sFC
Get Mac OS X Tiger in a Nutshell 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.