Re: The "what" command

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 ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-29-2003
rjt
 
Posts: n/a
Default Re: The "what" command

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.)

Reply With Quote
  #2 (permalink)  
Old 07-29-2003
Clive Dove
 
Posts: n/a
Default Re: The "what" command

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

Reply With Quote
  #3 (permalink)  
Old 07-29-2003
Art Werschulz
 
Posts: n/a
Default Re: The "what" command

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
Reply With Quote
  #4 (permalink)  
Old 07-30-2003
Amarjyoti Krishnan
 
Posts: n/a
Default Re: The "what" command

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
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:38 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0