Mac OS X comes with a handy screenshot utility. You use keyboard shortcuts for different functionality:

  • CMD+Shift+3 captures the entire screen.
  • CMD+Shift+4 lets you draw a rectangle where you want to capture
  • CMD+Shift+4 then Spacebar lets you click an application window to capture it.

I take a lot of screenshots, so I use those keyboards shortcuts all the time, but the default settings for screenshots aren't always what I want:

  • Save-to Directory: Desktop
  • File Format: .png
  • File Name: Screen Shot 2015-08-27 at 1.39.15 PM

I don't often feel the need to change the file name, but the default save-to directory can clutter up the desktop really fast. Also, on a slow connection, the .png files can take a while to upload to, say, a GitHub issue. You can change these settings in Terminal.app. Use the commands below to make it happen.

Change the directory

defaults write com.apple.screencapture location ~/Pictures/Screenshots/;killall SystemUIServer  

Change the file format

defaults write com.apple.screencapture type jpg;killall SystemUIServer  

You can use jpg, png, pdf, or tiff.

Change the filename

You can change the wording from "Screen shot" + date to "Project Name" + date by running this:

defaults write com.apple.screencapture name "Project Name";killall SystemUIServer  

Put them together

I want to capture .jpg files to the Screenshots folder that I have placed as a shortcut in my dock.

defaults write com.apple.screencapture location ~/Pictures/Screenshots/;defaults write com.apple.screencapture type jpg;killall SystemUIServer  

Back to the defaults

You can use this command to go back:

defaults write com.apple.screencapture location ~/Desktop/;defaults write com.apple.screencapture type png;killall SystemUIServer  

Marshall Thompson

More post by Marshall Thompson