5 Replies Latest reply: Feb 6, 2006 10:19 AM by BGist
BGist Level 2 Level 2 (265 points)
I'm trying to get Mac OS X squeezed onto a list of approved OS's for a banking audit, and to do so, I must have the command line command for version.

patch -p is useless, and the CLI for isntaller doens't seem to help. Does anyone know how to get this info?

If all else fails, I'll do osascript "get version of application "finder" but I'd prefer to have the patch level.

Dual G5, Mac OS X (10.4.4)
  • 1. Re: Version Info/Patch Level
    Nils C. Anderson Level 4 Level 4 (3,485 points)
    /usr/sbin/system_profiler SPSoftwareDataType -detailLevel mini
  • 2. Re: Version Info/Patch Level
    Gary Kerbaugh Level 6 Level 6 (18,040 points)
    Hi BGist,
       One can obtain slightly more detailed information than Andy's system_profiler command about the Darwin kernel from the uname command:

    uname -v

    However, I know of no other way to find the version and build number of Mac OS X. I've never seen that -detailLevel switch. That's cool Andy, thanks!
       Department chairmen never die, they just lose their faculties.
  • 3. Re: Version Info/Patch Level
    CloitusDisruptus Level 4 Level 4 (1,330 points)
    Probably of no use to you but just to complete the info, the 'machine' command returns the processor type, e.g. ppc7450
    The man page is mildly interesting:
    The machine command is currently under development.
  • 4. Re: Version Info/Patch Level
    mkfs Level 2 Level 2 (195 points)
    In addition to uname, try sw_vers -- it gives the build number.

    $ sw_versProductName: Mac OS X
    ProductVersion: 10.4.4
    BuildVersion: 8G32

    $ sw_vers -buildVersion
  • 5. Re: Version Info/Patch Level
    BGist Level 2 Level 2 (265 points)
    Thanks everyone for all the help! I was able to get this into the doc before release time, so OS X will be considered! Thanks!

    btw, the final command I used was the

    /usr/bin/uname -v