View Single Post

  #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