Operating System - HP-UX
1843967 Members
2166 Online
110226 Solutions
New Discussion

Re: Finding version of an executable

 
SOLVED
Go to solution
Sonison James
Frequent Advisor

Finding version of an executable

Hello,

I would like to know if there is a version associated with an executable that may not be part of a package and if so how I could find the version.

Thanks and regards
Sonison James
5 REPLIES 5
Rainer von Bongartz
Honored Contributor
Solution

Re: Finding version of an executable

Try the what command

what

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Michael Tully
Honored Contributor

Re: Finding version of an executable

e.g.
# what /stand/vmunix

Some of the executables will give you information like patching etc.
Anyone for a Mutiny ?
malay boy
Trusted Contributor

Re: Finding version of an executable

Try what.

sa_aaka > what sar
sar:
$Revision: 82.1.1.3 $
PATCH_11_00: sar.o 98/05/12

regards
mB

There are three person in my team-Me ,myself and I.
hein coulier
Frequent Advisor

Re: Finding version of an executable

In your own c-programs you can add

static char versionstring[]="@(#) v1.2.3"

or if you have rcs or so (rcs will replace at ci-time) :

static char versionstring[]="@(#) $Id$"

In you shellscript, just add

# @(#) v1.2.3 or # @(#) $Id$

with "what -s " you get the revision number.
Sonison James
Frequent Advisor

Re: Finding version of an executable

Thanks for the information.