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.
To identify the USB device in a Mac operating system: In the left column, select USB under Hardware. In the main area, the upper panel will display the USB device tree. Select a device in this tree to see more information. In the main area, the lower panel will display details for the selected USB device.
Go to the General tab (Finder > Preferences > General) and make sure the External disks item is selected. Go to the Sidebar tab and make sure the External disks location is selected. Close the Preferences window. Your USB flash drive should now be listed as a location in Finder and displayed as an icon on your Desktop.
You can use Terminal and execute:
system_profiler SPUSBDataType
It will show all connected USB devices, with detailed information.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With