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 |
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.
|
Sure. You can use yum to find out what package it came from, then use rpm -Va to verify the contents of the package.
If something has changed (md5sum, permissions, etc) it will report the change/difference. For example, if I change nano then check it, i get this: Quote:
|
If you want to avoid the pkg mgr, you could use 'find' and 'strings' .
Possibly also 'od' . |
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" |
All times are GMT -5. The time now is 09:02 AM. |