which Command Purpose Locates a program file, including aliases and paths. Syntax which [ Name ... ] Description The which command takes a list of program names and looks for the files that run when these names are given as commands. The which command expands each argument, if it is aliased, and searches for it along the user's path. The aliases and paths are taken from the .cshrc file in the user's home directory. If the .cshrc file does not exist, or if the path is not defined in the .cshrc file, the which command uses the path defined in the user's environ- ment. A diagnostic is given if a name is aliased to more than a single word or if an executable file with the argument name is not found in the path. In the Korn shell, you can use the whence command to produce a more verbose report. See " Korn Shell Special Commands" in AIX Version 3.2 System User's Guide: Base and Devices for more infor- mation on the whence command. Examples To find the executable file associated with a command name of lookup: which lookup Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Files \~/.cshrc Source of aliases and path values. Related Information Shells Overview in AIX Version 3.2 System User's Guide: Base and Devices describes shells, the different types, and how they af- fect the way commands are interpreted. Commands Overview in AIX Version 3.2 System User's Guide: Base and Devices. The csh command, find command, file command, ksh command, sh command, whereis command.