This is a discussion on Re: The "what" command within the Linux Administration forums, part of the Linux Forums category; Fred Bartholomai wrote: > Dear Fellow Linux users, > > I come from years of HP-UX unix background. We ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Fred Bartholomai wrote:
> Dear Fellow Linux users, > > I come from years of HP-UX unix background. We are in the midst > of porting our system to Red Hat Linux. > > We commonly use the "what" command in order to help > us with the version number for a particular applications > we are developing. > > I noticed on Red Hat Linux 8.0 that such a command doesn't > exist. Looked for it on the gnu site as well, but no luck. This is an old post, but what the hell... rpm -qf /path/to/some/application (This only works for files installed by rpm, which will include the entire base OS.) |
|
|||
|
rjt wrote:
> Fred Bartholomai wrote: >> Dear Fellow Linux users, >> >> I come from years of HP-UX unix background. We are in the midst >> of porting our system to Red Hat Linux. >> >> We commonly use the "what" command in order to help >> us with the version number for a particular applications >> we are developing. >> >> I noticed on Red Hat Linux 8.0 that such a command doesn't >> exist. Looked for it on the gnu site as well, but no luck. > > This is an old post, but what the hell... > > rpm -qf /path/to/some/application > > (This only works for files installed by rpm, which will include > the entire base OS.) I just use the -q switch and the short name of the application. e.g. in my system: rpm -q opera returns opera-7.11-20030515.1 |
|
|||
|
Hi.
Clive Dove <chdove@rogers.com> writes: > rjt wrote: > > > Fred Bartholomai wrote: > >> Dear Fellow Linux users, > >> > >> I come from years of HP-UX unix background. We are in the midst > >> of porting our system to Red Hat Linux. > >> > >> We commonly use the "what" command in order to help > >> us with the version number for a particular applications > >> we are developing. > >> > >> I noticed on Red Hat Linux 8.0 that such a command doesn't > >> exist. Looked for it on the gnu site as well, but no luck. > > > > This is an old post, but what the hell... > > > > rpm -qf /path/to/some/application > > > > (This only works for files installed by rpm, which will include > > the entire base OS.) > > > I just use the -q switch and the short name of the application. > e.g. in my system: > rpm -q opera > returns > opera-7.11-20030515.1 That's only because the "opera" package is installed on your system. If a particular application's basename isn't the same as a package name, this won't work. For example ... bash-2.05b$ rpm -q csh package csh is not installed bash-2.05b$ rpm -qf /bin/csh tcsh-6.12-4 -- Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y? Internet: agw@cs.columbia.edu<a href="http://www.cs.columbia.edu/~agw/">WWW</a> ATTnet: Columbia U. (212) 939-7060, Fordham U. (212) 636-6325 |
|
|||
|
rjt wrote:
> Fred Bartholomai wrote: >> Dear Fellow Linux users, >> >> I come from years of HP-UX unix background. We are in the midst >> of porting our system to Red Hat Linux. >> >> We commonly use the "what" command in order to help >> us with the version number for a particular applications >> we are developing. >> >> I noticed on Red Hat Linux 8.0 that such a command doesn't >> exist. Looked for it on the gnu site as well, but no luck. > > This is an old post, but what the hell... > > rpm -qf /path/to/some/application > > (This only works for files installed by rpm, which will include the > entire base OS.) Most of the programs have the --version option. Try gcc --version or vi --version I hope that helps. Amar -- Know us - http://poornam.com Tech support - http://bobcares.com Hosting Control Panel - http://ikonware.com |
![]() |
| Thread Tools | |
| Display Modes | |
|
|