To get a description of the Mac you can use the following command.

/usr/libexec/PlistBuddy -c "Print :`sysctl -n hw.model`:_LOCALIZABLE_:description" "/System/Library/PrivateFrameworks/ServerInformation.framework/Resources/English.lproj/SIMachineAttributes.plist"

Example output: Mac mini with quad-core i7 and Intel HD Graphics 4000, introduced late 2012.

The following command can provide the Mac model information, including its "era" (example: Mac mini (Late 2012))

/usr/libexec/PlistBuddy -c "Print :`sysctl -n hw.model`:_LOCALIZABLE_:marketingModel" "/System/Library/PrivateFrameworks/ServerInformation.framework/Resources/English.lproj/SIMachineAttributes.plist"

Topic revision: r1 - 2018-08-29 - StephenNickerson
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback