Run System Profiler from the Terminal -- revisited

Jun 20, '03 10:30:00AM

Contributed by: Anonymous

I was recently pointed to a CLI version of Apple System Profiler as a way to gather information on workstations. I'm still working on how I might use the command and parse the data, but I thought I'd share the command here as I couldn't find it on the site via the search engine. Here's the command:

system_profiler
It can be redirected to a text file like this:
system_profiler > profiler_output.txt
The only flags the utility seems to take is one that causes the output to be in XML. I'm sure that could be handy for folks that want to process the data in that form:
system_profiler -xml > profiler_output.xml
[robg adds: This appears to be the replacement for the AppleSystemProfiler command that was covered in this hint, but vanished with the release of Jaguar. If you don't run it in redirected mode, make sure you give it some time to finish its output!]

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030618161915352