Command-Shift-3 Take a screenshot of the screen, and save it as a file on the desktop
Command-Shift-4, then select an area: Take a screenshot of an area and save it as a file on the desktop
Command-Shift-4, then space, then click a window: Take a screenshot of a window and save it as a file on the desktop
Command-Control-Shift-3: Take a screenshot of the screen, and save it to the clipboard
Command-Control-Shift-4, then select an area: Take a screenshot of an area and save it to the clipboard
Command-Control-Shift-4, then space, then click a window: Take a screenshot of a window and save it to the clipboard
The following keys can be held down while selecting an area (via Command-Shift-4 or Command-Control-Shift-4):
Space, to lock the size of the selected region and instead move it when the mouse moves
Shift, to resize only one edge of the selected region
Option, to resize the selected region with its center as the anchor point
Location to save screenshots (location)
defaults write com.apple.screencapture location ~/Desktop
killall SystemUIServer
Filename prefix for screenshots (name)
defaults write com.apple.screencapture name "Screenshot"
killall SystemUIServer
Screenshot format (type)
defaults write com.apple.screencapture type jpg
killall SystemUIServer
Whether screenshots of windows should show shadows (disable-shadow)
defaults write com.apple.screencapture disable-shadow -bool false
killall SystemUIServer