How do you check the version of a unix binary?

Discussion in 'Unix & X11' started by vikingshelmut, Feb 19, 2003.

  1. vikingshelmut

    vikingshelmut 100% Bull Plop

    Joined:
    Dec 5, 2001
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Über Genius
    Location:
    Cupertino, CA
    I can't remember if this is possible, but I'd like to check the version of some unix binaries I've installed.

    For example, I'd like to be able to use a Terminal command to tell me what version of MySQL or GiMP or whatever, I have installed. I know you can use Fink, since that is what I installed these binaries with.

    I'd like to know a universal terminal command to check the version of any unix app i have installed.

    Any ideas?

    Also, I know that you can check the what version of perl I have installed by typing:
    perl -v
    This seams to only work for perl, so it must be a variable specific to perl only.

    Any guru's know this?
     
  2. nickn

    nickn Registered

    Joined:
    Feb 11, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    0
    Most of the time you do a -v flag or something of the such, for every command though, I'd try "man command" it should tell you what to use to check the version of that specific program.
     
  3. Darkshadow

    Darkshadow wandering shadow

    Joined:
    Jul 17, 2001
    Messages:
    1,532
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    DE, USA
    Mostly the -v option works (sometimes you need to do --v), but this has to be programmed in, and not all of them support it. Some of them also support -help or --help, and will tell you what options there are.
     
  4. nickn

    nickn Registered

    Joined:
    Feb 11, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    0
    However like I said..I'd say 4 out of every 5 will say in "man command" --help and all is is guessing, why try -v, than --v, than -help, than --help , instead of just doing "man blah" and finding out for sure ?

    the man command is your friend, use it.
     
  5. btoneill

    btoneill keeper of the cheese

    Joined:
    Jul 8, 2002
    Messages:
    797
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Unix Geek
    Location:
    Minneapolis, MN
    Not all applications have man pages, not all man pages list the version number, and not all man pages are correct and/or upto date. I've seen man pages for apps where the man page hasn't been updated in 5 years because none of the features of the app have changed, but the app has been updated. Checking the version in the man page may give you the right version, it may not, I'd check the man page for the version as a last resort.

    Brian
     
  6. michaelsanford

    michaelsanford Translator, Web Developer

    Joined:
    Oct 7, 2002
    Messages:
    2,277
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Translator & Web Developer
    Location:
    Ottawa/Montréal
    btoneill, that is absolutely true. For a great example, do "man rm" and you'll see this nice "BSD - December 5, 1994" at the bottom :p

    What do you need to check the versions for, incidentally? Curiosity, or do you have dependancy issues for software you're compiling?
     

Share This Page