HOW-TO: Locate Installed Binaries

As a system administrator, locating binaries of installed programs or applications is difficult to track. This is true most especially when the hosts to maintain or administer are growing in number.

The same is also true on the side of the ordinary user. How does one get to use binaries or applications not defined in the PATH environment variable? Or a non-standard application path for that matter.

Whether a privileged user or a normal user, the bigger question is: How then does one locate installed binaries? Let us consider the above questions for Linux and Solaris.

Solaris. For Solaris, the installed binaries are logged in a flat file. That file is /var/sadm/install/contents. Searching the entries in the file then will yield the location of the binaries.

root@host # grep FILENAME /var/sadm/install/contents

If the binary to look for is not installed via pkgadd, then the "find" utility is the only resort in locating the binary.

Linux. There is a tool called "locate" to pinpoint the exact location of a binary in Linux. This tool is part of the findutils rpm. To use this tool run it as:
root@host # locate FILENAME

If the locate database does not exist, "locate -u" is used to create it. To update the database of locate, the utility "updatedb" is ran.

Just like Solaris, the find utility can also look for binaries as last resort.

Given the above utilities, you may now edit the startup scripts (.cshrc or .profile) to include the non-standard paths for application binaries used.

You might also be interested in:


We at pimp-my-rig strive to keep on improving, help us reach that goal by leaving comments or constructive criticisms. Don't miss out on our next feature -- subscribe via RSS (What is RSS?).

Share This