Retrieving Mac System Profiler Data from the Shell

How can I get the information shown in the Mac System Profiler app programmatically? I'm really interested in the USB section, if that matters.

+1
macos system-profiler
source share
2 answers

Take a look at the system_profiler (8) command.

+2
source share

The OSX command line tool "ioreg" can give you the information you need.

man ioreg

ioreg displays a registry of I / O systems. It shows the hierarchical registry as an inverted tree.

Also, if you can / want to use Cocoa, check out IOKit . IOKit is an OSX platform that supports USB equipment.

+3
source share

All Articles