macOS使用自带命令查看电池健康度 复制如下命令,粘贴到终端运行,可以查看当前电脑的健康度: 1ioreg -rn AppleSmartBattery | awk '/AppleRawMaxCapacity/{raw=$NF} /DesignCapacity/{design=$NF} /CycleCount/{cycle=$NF} END{printf "当前最大容量: %d mAh | 设计容量: %d mAh | 循环次数 %d 次 | 健康度: %.1f%%\n", raw, design, cycle, (raw/design)*100}' #macOS macOS使用自带命令查看电池健康度 https://dnacore.github.io/post/147917cc-2acb-4025-9374-5333d7785229.html 作者 DNACore 发布于 2025年5月13日 更新于 2025年5月13日 许可协议 Shell-shell中的 Here Document 语法 上一篇 Swift-macOS自带的 Swift 编译器 下一篇 Please enable JavaScript to view the comments