Re: List of all applications
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 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