Re: The "what" command - Linux

This is a discussion on Re: The "what" command - Linux ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Re: The "what" command

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


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


  3. Re: The "what" command

    Hi.

    Clive Dove 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.eduWWW
    ATTnet: Columbia U. (212) 939-7060, Fordham U. (212) 636-6325

  4. 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 to Thread