• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: List of all applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List of all applications


  • Subject: Re: List of all applications
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 20 Feb 2011 12:01:41 -0600

On 20/02/11 02:34, "email@hidden" <email@hidden> wrote:
On Feb 19, 2011, at 2:31 AM, jan wrote:
mdfind -onlyin /Applications/ 'kMDItemLastUsedDate > $time.now(-3600)'

Thanks for this, Jan.  That's an interesting command.  I read the man page for 
mdfind and, unfortunately, it appears that you can't search for applications 
only with this command.  Bummer. =:\

On Feb 20, 2011, at 10:00, jan wrote:
OK then try with this extra grep option

mdfind -onlyin /Applications/ 'kMDItemLastUsedDate > $time.now(-3600)' | grep .app
______________________________________________________________________

If you're going to use 'grep' better to use 'egrep' with case insensitive turned on; it's also better to make the regular _expression_ more specific:

mdfind -onlyin /Applications/ 'kMDItemLastUsedDate < $time.now(-5184000)' | egrep -i "\.app$"

But why not just use Spotlight?

Applications not accessed in the last 60 days:

mdfind -onlyin /Applications/ 'kMDItemFSName == "*.app"c && kMDItemLastUsedDate < $time.now(-5184000)' # | sed -nE "s|^.+/([^/]+\.app)|\1|gp"

OR

mdfind -onlyin /Applications/ 'kMDItemKind == "Application" && kMDItemLastUsedDate < $time.now(-5184000)' # | sed -nE "s|^.+/([^/]+\.app)|\1|gp"

On my system the first option produces about 5 more applications than the second.  Strangely there are also several applications that when launched do not get their 'kMDItemLastUsedDate' tag updated.

Oh; uncomment the 'sed' part of the command to produce just the application name.

--
Best Regards,
Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: List of all applications (From: jan <email@hidden>)

  • Prev by Date: Decipher Recent Items descriptors
  • Next by Date: Re: List of all applications
  • Previous by thread: Re: List of all applications
  • Next by thread: Re: List of all applications
  • Index(es):
    • Date
    • Thread