2

Im writting a program that lists all the software installed in my mac. Where can I find that information? Thank you

gustavo
  • 55
  • 1
  • 6
  • 1
    What do you call installed software? Applications which can be copied anywhere? Packages which don't seem to be uninstallable? MacPorts ports? – ssmir Jan 20 '11 at 15:58

2 Answers2

2

You can call lsregister -dump to get a list of all applications registered with Launch Services. The output will need to be parsed, though; each record has a path property that lists the full path to the application.

A simpler way would just be to scan /Applications for all .app bundles, as well as ~/Applications for each user. That method wouldn't be guaranteed to get all applications, but it would be a pretty good start.

mipadi
  • 398,885
  • 90
  • 523
  • 479
-1

Open a terminal window and type ps -ef | grep 'java'

ps displays information about a selection of the active processes. ps -ef sees every process on the system using standard syntax. The pipe (|) sends the results to grep which allows you to search one file or multiple files for lines that contain a pattern. In this case the pattern is the word 'java'.

I've put this into an alias in my startup script so I can go it quickly.

jebrick
  • 339
  • 1
  • 6
  • 14
  • 2
    ps only display active process. I process isn't a software. A software can spawn multiple process. The output of ps isn't relevant if you want to know what is installed on the machine. Since ps only display active process, which don't reflect a software. Unless you have a list of process name that match a software somewhere. Unfortunately I can't help more than that. I don't own a mac.. and only worked on mac 3 years ago for 6 months. – Loïc Faure-Lacroix Jan 20 '11 at 15:49