Locations of startup items


__Running `launchctl list` show you what launch scripts are currently loaded.__

Hide desktop icons

defaults write com.apple.finder CreateDesktop -bool false
killall Finder

Auto-hide other windows on dock switch

defaults write com.apple.dock single-app -bool TRUE
killall Dock

defaults delete com.apple.dock single-app
killall Dock

Flush DNS

killall -HUP mDNSResponder   # 10.8+
dscacheutil -flushcache      # 10.7 below

Disable spotlight indexing

mdutil -a -i off                    # disable indexing for all volumes
mdutil -i off MOUNT_POINT           # disable for specific volume
touch FOLDER/.metadata_never_index  # disable for FOLDER

Turn on/off proxy

sudo networksetup -setsocksfirewallproxystate Wi-Fi off
sudo networksetup -setsocksfirewallproxystate Ethernet off
sudo networksetup -setsocksfirewallproxy Wi-Fi 9999
sudo networksetup -setsocksfirewallproxy Ethernet 9999
sudo networksetup -setsocksfirewallproxystate Wi-Fi on
sudo networksetup -setsocksfirewallproxystate Ethernet on

System utils

  • networksetup - Configure network (ip, dns, proxy, etc)
  • tmutil - Configure Time Machine (enable/disable, exclude path, delete snapshots, etc)
  • mdutil - Manage Spotlight (enable/disable, exclude, etc)
  • diskutil - Control disk (format, eject, unmount, etc)
  • launchctl - Control running “agents”

Useful utils

  • open - open files and directories (man)
  • textutil - manipulate text files of various formats (man)
  • pbcopy / pbpaste - provide copying and pasting to the pasteboard (man)
  • sips - scriptable image processing system (man)
  • mdfind - finds files matching a given query (man)
  • screencapture - capture images from the screen (man)
  • defaults - access the Mac OS X user defaults system (man)
  • /usr/libexec/airportd
  • scutil

INFO: brew (link) is highly recommended utility

0 Comments for this cheatsheet. Write yours!