LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-17-2017, 09:29 AM   #1
ohijames
LQ Newbie
 
Registered: Jun 2010
Posts: 17

Rep: Reputation: 0
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
 
Old 02-17-2017, 09:40 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,788
Blog Entries: 13

Rep: Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831
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.
 
Old 02-17-2017, 09:42 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693Reputation: 1693
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:
[root@tools ~]# which nano
/usr/bin/nano
[root@tools ~]# > /usr/bin/nano
[root@tools ~]# rpm -Va nano
S.5....T. /usr/bin/nano
 
Old 02-20-2017, 03:29 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,237

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
If you want to avoid the pkg mgr, you could use 'find' and 'strings' .
Possibly also 'od' .
 
Old 02-20-2017, 07:03 AM   #5
nodir
Member
 
Registered: May 2016
Posts: 222

Rep: Reputation: Disabled
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"
 
  


Reply

Tags
binaries, hpux, linux, rpm vendor list, unix


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Do Linux Binaries run atop a Solaris environment...? Alexvader Solaris / OpenSolaris 2 03-07-2011 11:36 AM
Do GNU Makefiles have to be hacked to build Solaris binaries...? Alexvader Solaris / OpenSolaris 1 07-07-2010 03:31 PM
application compiled on solaris 10 throwing error when executed on solaris 9 ash_bit2k2 Solaris / OpenSolaris 2 06-18-2010 07:14 AM
can Solaris Express Dev. Ed. execute Linux binaries ? dragoncity Solaris / OpenSolaris 11 04-14-2008 07:52 AM
Fonts problem when migrating application program from HPUX to RHEL how9ss Linux - Newbie 0 10-09-2007 09:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration