How to get an application name from its binaries Linux, Solaris, HPUX
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to get an application name from its binaries Linux, Solaris, HPUX
Hi,
Please, is it possible? or is there a command one can use to get an application name/vendor from its binaries in Linux, Solaris and HPUX.
I had a situation once where sudo was installed on OEL 5 and anytime I ran "rpm - qa | grep sudo" it didn't return anything even though the binaries existed. I later found out that the rpm database was corrupt and had to fix it for it to work properly.
I am wondering if there is any other thorough process of checking binaries to know if an application is installed and possibly return the application
I will also like to get the vendor name for example there is sudo from Quest and thee is sudo from www.sudo.ws. I will like to be able to differentiate between these for my script to work
Thanks,
O
Last edited by ohijames; 02-17-2017 at 10:30 AM.
Reason: adding more information
Not sure about sudo, however you can get the version or help on most commands using either --help --version, -h -v, /h /v, or /help /version. There should be some form of command line switches you can use to obtain this information.
Not sure if that is what you ask for:
"which(1) is an external program used to search PATH for an executable. It behaves differently on different systems and you can't rely on a useful exit code; use (from most to least portable) ''command -v'' or ''type -P'' (to find the path) or ''hash'' (to check) instead. See http://mywiki.wooledge.org/BashFAQ/081"
And there is also "whereis"
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.