New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

List your installed applications


Post Reply New Thread Subscribe

 
Thread Tools
gatorparrots
Guest
 
Posts: n/a

AppleSystemProfiler | grep Applications >> ~/installedApps.txt
This launches the GUI version of Apple System Profiler, but then it pipes the results of the "Applications" tab through a grep seach and then outputs the result to a text file in your home directory. Simple and clean -- it finds all Carbon or Cocoa applications. (Leave off the '>> ~/installedApps.txt' if you want it to output directly to the shell and not to a text file.)

One caveat: the above code will just find what is in your /Applications directory.

To search your drive for Cocoa apps, do this:
sudo find / -name "*.app" >> ~/CocoaApps.txt
or
sudo locate '*.app' >> ~/CocoaApps.txt
(very fast, but only accurate if your locate.db has been rebuilt recently)

The final approach is slower, but will find and list all applications in /Applications, whether they are Carbon or Cocoa. (AppleScript authored by pmccann at forums.macosxhints.com):

Code:
-- Configure this if necessary: exclude_dirs is just a list
-- of directory names (within starting_dir) that the script 
-- should not examine for applications. If you don't have any
-- directories that need excluding you can set exclude_dirs to {} 
-----------------------------------------
set starting_dir to (path to the startup disk as string) & "Applications:"
set exclude_dirs to {}
-----------------------------------------
on getapps(given_dir)
	global app_list, exclude_dirs
	tell application "Finder"
  if the name of folder given_dir is in exclude_dirs then
  	set inside_this to {} --just empty it out
  else
  	set mylist to (every file of folder given_dir whose file type is "APPL")
  	repeat with filex in mylist
    set app_list to app_list & the POSIX path of (filex as alias)
  	end repeat
  	set inside_this to every folder of folder given_dir
  end if
	end tell
	repeat with another_dir in inside_this
  getapps(another_dir as alias)
	end repeat
end getapps
global applist, exclude_dirs
set app_list to {}
getapps(starting_dir)
return app_list
QUOTE Thanks

Post Reply New Thread Subscribe


« Duplicate a CD/DVD-ROM via the command line | Fixing the Default Housekeeping schedule »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Indispensable MacOS X Software - a list Konkis OS X - Operating System 3 03-04-2005 04:37 AM
Applications won't launch in Panther trinket OS X - Operating System 6 01-22-2004 09:45 PM
3rd party applications and 10.3.2 crr OS X - Operating System 4 01-20-2004 02:14 PM
Jobs makes top 25 list of influential IT execs Murlyn Apple Rumors and Reports 1 11-17-2003 03:28 PM

All times are GMT -4. The time now is 02:43 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?