在Mac OS上枚举USB驱动器和USB层次结构

时间:2021-08-11 16:07:34

What is the best way to discover what USB drives are connected, where they are mounted, and their unique details like Serial number, PID and which USB Hub port they are connected to? Something similar to what USBlyzer does for Windows but programmatically.

什么是发现USB驱动器连接,安装位置以及序列号,PID和连接的USB Hub端口等独特细节的最佳方法?类似于USBlyzer为Windows做的,但是以编程方式。

4 个解决方案

#1


You can use Terminal and execute:

您可以使用终端并执行:

system_profiler SPUSBDataType

It will show all connected USB devices, with detailed information.

它将显示所有连接的USB设备,并提供详细信息。

#2


The Finder has an "about this mac" option under the Apple at the upper left. Ask for more info and follow the devices===> USB tree to find your answers. In a shell or another executing module, I have no idea how to retrieve this info.

Finder在左上方的Apple下面有一个“关于这个mac”的选项。询问更多信息并按照设备===> USB树查找答案。在shell或其他执行模块中,我不知道如何检索此信息。

#3


USB Prober is the most useful tool. It can be found at /Developer/Applications/Utilities/USB Prober.

USB Prober是最有用的工具。它可以在/ Developer / Applications / Utilities / USB Prober中找到。

#4


I'm not an expert of I/O on Mac OS X, but I've heard of I/O Kit, which may be a good starting point.

我不是Mac OS X上的I / O专家,但我听说过I / O Kit,这可能是一个很好的起点。

#1


You can use Terminal and execute:

您可以使用终端并执行:

system_profiler SPUSBDataType

It will show all connected USB devices, with detailed information.

它将显示所有连接的USB设备,并提供详细信息。

#2


The Finder has an "about this mac" option under the Apple at the upper left. Ask for more info and follow the devices===> USB tree to find your answers. In a shell or another executing module, I have no idea how to retrieve this info.

Finder在左上方的Apple下面有一个“关于这个mac”的选项。询问更多信息并按照设备===> USB树查找答案。在shell或其他执行模块中,我不知道如何检索此信息。

#3


USB Prober is the most useful tool. It can be found at /Developer/Applications/Utilities/USB Prober.

USB Prober是最有用的工具。它可以在/ Developer / Applications / Utilities / USB Prober中找到。

#4


I'm not an expert of I/O on Mac OS X, but I've heard of I/O Kit, which may be a good starting point.

我不是Mac OS X上的I / O专家,但我听说过I / O Kit,这可能是一个很好的起点。