Get rid of double (triple) entries in Finder’s “Open With” Menu

Apple, Leopard, Lion, Macintosh, Mountain Lion, OSX, osx Server, Tip
Does sh*t like this make you wanna smack your mac :-) Here is a quick way to rebuild the Launch Services database and get rid of duplicates in the Open With submenu: /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user This process should take about a minute or two. You should check to see if this has fixed the problem. On my machine, running 10.8.2, I had to also restart Finder to complete the process using the following command: killall Finder That's all.....Now Open With submenu is squicky clean
Read More

CLI commands that let you access meta data of all files in OSX

Apple, CLI, Lion, Mountain Lion, OSX, osx Server, spotlight, Tip, Tricks
Two small commands with huge possibilities: mdls  usage: mdls [-name attr] [-raw [-nullMarker markerString]] [-plist file] pathlist the values of one or all the attributes of the specified file -raw: don't print attribute names before values -nullMarker: substitute this string for null attributes in raw mode -plist: output attributes in XML format to file. Use - to write to stdout option -plist is incompatible with options -raw, -nullMarker, and -nameexample: mdls ~/Pictures/Birthday.jpgexample: mdls -name Keyword ~/Pictures/Birthday.jpg mdfind Usage: mdfind [-live] [-count] [-onlyin directory] [-name fileName | -s smartFolderName | query] list the files matching the query query can be an expression or a sequence of words -live Query should stay active -count Query only reports matching items count -onlyin <dir> Search only within given directory -name <name> Search on file…
Read More

Get Control of Mountain Lion with a huge list of command line tweaks…..

Apple, CLI, Lion, Macintosh, Mountain Lion, OSX, osx Server
As pointed out to me in the comments the original Author -- Mathias Bynens -- is constantly updating this document. You can find the latest up to date version at http://mths.be/osx # ~/.osx — http://mths.be/osx ############################################################################### # General UI/UX # ############################################################################### # Set computer name (as done via System Preferences → Sharing) scutil --set ComputerName "MathBook Pro" scutil --set HostName "MathBook Pro" scutil --set LocalHostName "MathBook-Pro" # Menu bar: disable transparency defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false # Menu bar: show remaining battery time (on pre-10.8); hide percentage defaults write com.apple.menuextra.battery ShowPercent -string "NO" defaults write com.apple.menuextra.battery ShowTime -string "YES" # Menu bar: hide the useless Time Machine and Volume icons defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/Library/CoreServices/Menu Extras/AirPort.menu" "/System/Library/CoreServices/Menu Extras/Battery.menu" "/System/Library/CoreServices/Menu Extras/Clock.menu" # Always show scrollbars defaults write…
Read More

Get the “Bounce” command back in Mail application under OSX Lion

Apple, Automator, Lion, Macintosh, OSX
The "Bounce" command is really useful for those times when you're receiving spam mail that gives you no recourse to opt-out. Usually Ads and announcements have a link to unsubscribe, but if they don't I usually just "bounce" the mail back to the sender and that usually causes the sender to take me off their mailing list. As of the release of Lion, apple (for some reason) has decided to take that functionality and the associated button away from the Mail app. To be more precise, they've removed the icon and the menu option, but the function is still there, buried in the guts of mail. You can get it back by creating the following Automator Service script. Follow the instructions below: Open Automator application Create a new Service when…
Read More