Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enumerating USB drives and usb hierarchy on Mac OS

Tags:

macos

usb

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.

like image 979
Abdullah Jibaly Avatar asked Jan 07 '09 21:01

Abdullah Jibaly


People also ask

Where is USB device tree on Mac?

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.

Why can't I find my USB drive on my Mac?

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.


2 Answers

You can use Terminal and execute:

system_profiler SPUSBDataType

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

like image 167
Niko Avatar answered Oct 16 '22 10:10

Niko


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.

like image 22
guzzibill Avatar answered Oct 16 '22 10:10

guzzibill