UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: whatisChapter 2
Unix Commands
Next: Reference: who
 

which

which [commands]

List 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. (See type, Chapter 4 and Chapter 5.)

Example

$ which file ls
/usr/bin/file
ls:      aliased to ls -sFC


Previous: Reference: whatisUNIX in a Nutshell: System V EditionNext: Reference: who
Reference: whatisBook IndexReference: who

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System