System Profiler如何检索完整的Mac硬件标识符? [英] How does System Profiler retrieve the full Mac hardware identifier?

查看:1112
本文介绍了System Profiler如何检索完整的Mac硬件标识符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有几个终端命令可以检索Mac硬件的数字/缩写模型标识符。

There are several terminal commands to retrieve the numerical / abbreviated Model Identifier for Mac hardware.


  • sysctl hw .model

  • system_profiler SPHardwareDataType

  • sysctl hw.model
  • system_profiler SPHardwareDataType

这些转储具有硬件名称和x,y版本的字符串。目前,我们必须维护一个表,将这些标识符转换为全英文的机器描述。

These dump a string with the hardware name and x,y versioning. Currently we have to maintain a table to convert these identifiers into the full english machine description.

有一个API,或者更好的命令行工具,可以产生更多的人友好的名称,符合Apple的文档 MacBook Pro 15英寸,2009年中期,而不是更为简短的 MacBookPro5,3 模型标识符

Is there an API, or better a command line tool that can produce the more human friendly names that match Apple's documentation MacBook Pro 15-inch, Mid 2009 instead of the more abbreviated MacBookPro5,3 Model Identifier?

很简单,System Profiler如何获得Mac的完整名称,我通过脚本或程序系统地利用这些信息?

Quite simply, how does System Profiler get the nice full names of Macs and can I exploit that information systematically via script or program?

推荐答案

检查网络流量。系统信息正在连接到

Did check the network traffic. System Information is connecting to


http://支持-sp.apple.com

完整查询如下所示:

http://support-sp.apple.com/sp/product? cc = DJWR& lang = de_DE

其中'DJWR'是序列号的最后四个字符

Where 'DJWR' are the last four characters of the serial number

更多信息: http:// blog .coriolis.ch / get-your-apple-device-model-name-in-a-readable-format /

这篇关于System Profiler如何检索完整的Mac硬件标识符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆