You can indirectly get this information from a web page and the curl command.
Take the last 4 characters of your serial number and feed that to the following URL after the ?cc=XXXX part. If your serial number ended in DJWR, you would issue this command:
curl http://support-sp.apple.com/sp/product?cc=DJWR
To get your serial number, use the following command:
system_profiler SPHardwareDataType | awk '/Serial/ {print $4}'
Thus, you could have a complicated command to query the internet if you need a single command:
curl http://support-sp.apple.com/sp/product?cc=`system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | cut -c 9-`
and then run the output of that through sed to cut to the key part
curl -s http://support-sp.apple.com/sp/product?cc=`system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | cut -c 9-` |
sed 's|.*<configCode>\(.*\)</configCode>.*|\1|'
There used to be a private library file with these mappings so you could consult it offline, but I noticed it was gone as of 10.8.3 (and perhaps earlier) so the above trick is the only one I know that works on the current OS.
But in OS X 10.7 and 10.8...
sentence? When I look in the About This Mac window I don't see anything that states Late 2009 or something similar. – Bart Arondson Aug 6 at 10:11About This Mac
and then onMore Info...
. I have no clue on how to get that information in your terminal. – Bart Arondson Aug 6 at 10:43