.CD "which \(en examine $PATH to see which file will be executed" .SX "which \fIname" .FL "\fR(none)" .EY "which a.out" "Tells which \fIa.out\fR will be executed" .PP The $PATH shell variable controls the .MX search rules. If a command \fIa.out\fR is given, the shell first tries to find an executable file in the working directory. If that fails, it looks in various system directories, such as \fI/bin\fR and \fI/usr/bin\fR. The\fR which\fR command makes the same search and gives the absolute path of the program that will be chosen, followed by other occurrences of the file name along the path.