How do you check the version of a unix binary?

vikingshelmut

100% Bull Plop
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?
 
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.
 
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.
 
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.
 
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
 
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?
 
Back
Top