![]() | Locating commands You may want to know the exact location of the command you are running. One reason for this may be to verify you are running the correct version of a particular command because there may be a private version of the command in your home directory, and then a shared public version in one of the top-level system directories. The which and whereis commands can be used to display the location of a command. which will show you the full path to the file that would run if you typed in the command, and whereis will show you the path to the binary (compiled), source (non-compiled), and man pages for a command. Man pages are part of the online help manual and will be discussed in an upcoming module. You can use either of these commands by using the name of the command you would like to know the location of as an argument: $ which date /bin/date OR $ whereis date date: /bin/date /usr/share/man/man1/date.1.bz2 |
| * You are viewing a page from LiveFire Labs' sample online UNIX training course. Click here if you do not see a blue and green frame around this page, or view the detailed description for this course. LiveFire Labs - Online UNIX Training |