Risposte:
Oltre a system_profiler SPUSBDataType(suggerito da @kjs), puoi anche utilizzare ioreg -p IOUSB:
$ ioreg -p IOUSB
+-o Root <class IORegistryEntry, id 0x100000100, retain 10>
+-o EHCI Root Hub Simulation@1A,7 <class IOUSBRootHubDevice, id 0x100000227,$
| +-o HubDevice@fa100000 <class IOUSBHubDevice, id 0x10000027a, registered, $
| | +-o Apple Internal Keyboard / Trackpad@fa120000 <class IOUSBDevice, id 0$
| | +-o BRCM2070 Hub@fa110000 <class IOUSBHubDevice, id 0x1000002b4, registe$
| | +-o Bluetooth USB Host Controller@fa113000 <class IOUSBDevice, id 0x10$
| +-o FaceTime HD Camera (Built-in)@fa200000 <class IOUSBDevice, id 0x100000$
+-o EHCI Root Hub Simulation@1D,7 <class IOUSBRootHubDevice, id 0x100000228,$
+-o HubDevice@fd100000 <class IOUSBHubDevice, id 0x10000027b, registered, $
+-o IR Receiver@fd110000 <class IOUSBDevice, id 0x100000288, registered,$
Per impostazione predefinita, si aggancia alla larghezza della finestra (80 caratteri nell'esempio sopra), quindi potresti voler aggiungere -w0per ottenere una visualizzazione a larghezza intera. Inoltre, l'aggiunta -lmostrerà i dettagli (probabilmente più del necessario) su ciascuno dei dispositivi:
$ ioreg -p IOUSB -w0 -l
+-o Root <class IORegistryEntry, id 0x100000100, retain 10>
| {
| "IOKitBuildVersion" = "Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64"
| "OS Build Version" = "14B25"
| "OSKernelCPUSubtype" = 3
| "OSKernelCPUType" = 16777223
| "OSPrelinkKextCount" = 185
| "IOConsoleLocked" = No
| "IORegistryPlanes" = {"IOACPIPlane"="IOACPIPlane","IOPower"="IOPower","IODeviceTree"="IODeviceTree","IOService"="IOService","IOUSB"="IOUSB","IOFireWire"="IOFireWire"}
[...etc...]
[EDIT]: se desideri solo i nomi dei dispositivi, puoi filtrare l'elenco di base per tagliare la spazzatura:
$ ioreg -p IOUSB -w0 | sed 's/[^o]*o //; s/@.*$//' | grep -v '^Root.*'
EHCI Root Hub Simulation
HubDevice
Apple Internal Keyboard / Trackpad
BRCM2070 Hub
Bluetooth USB Host Controller
FaceTime HD Camera (Built-in)
EHCI Root Hub Simulation
HubDevice
IR Receiver
ioregmostra come connesso, ma diskutil listnon lo mostra. Ci sono delle informazioni ioregche potrei usare per montare l'angolo?
ioregpoterti dire quello che vuoi sapere.
ioreg -p IOUSB -w0 -l | subl. Questo comando ioreg mostra anche i dispositivi utilizzati dalla mia virtual box, il che è davvero utile.
Esegui questo comando:
system_profiler SPUSBDataType
System Information(che probabilmente è) ma mostra troppi dettagli, ma è utile sapere
system_profiler -xml SPUSBDataType