###Useful OS X commands ####(initially by iharosi's Useful OS X commands)
-
App Store Debug menu
Show
defaults write com.apple.appstore ShowDebugMenu -bool trueHide
defaults write com.apple.appstore ShowDebugMenu -bool false -
Remove extended attributes recursively
xattr -rc <Folder> -
Delete Time Machine backups
sudo /System/Library/Extensions/TMSafetyNet.kext/Helpers/bypass rm -rfv /Volumes/<Disk>/Backups.backupdb/<Folder>/ -
Carbon copy a physical disk to an image (.dmg) file
source: http://hints.macworld.com/article.php?story=20050302225659382dd bs=4096 if=/dev/rXX# of=/[TARGET DIR]/image.dmg conv=noerror,syncYou have to dismount the partition first.
Use thediskutil listandmountcommands to discover the devices. -
Convert .png images to .jpg
sips -s format jpeg ./*.png --out jpg/ -
Resample image
sips <source image> --resampleHeight <number> --out <directory> -
Finder Error -10810
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed -rfv