How can I retrieve the information shown in the Mac's System Profiler app programatically? I'm actually interested in the USB section if that matters.
Asked
Active
Viewed 2,549 times
2 Answers
3
The OSX command line tool "ioreg" might give you want you want.
man ioreg
ioreg displays the I/O Kit registry. It shows the heirarchical registry as an inverted tree.
Also if you can/want to use Cocoa look at IOKit. IOKit is the OSX framework that talks to USB hardware.
-
I think this is almost what I'm looking for. Two things though, I don't see the Volume information associated with the USB disk, for example the mount point. Second, is there a way to filter the output to get USB devices only? – Abdullah Jibaly Jan 09 '09 at 03:31
-
An easy way to see OS X volume information from the command line is either using df (I usually use "df -h" for human readable format) or using diskutil (command line tool is basically Disk Utility.app). If you run "diskutil list" that will show you volume information. – hacintosh Jan 09 '09 at 03:53