(This revised post was initially posted on 2013-07-30.)

A co-worker showed me that (on the Mac) you can move the destination of screenshots (e.g. ⇧+⌘+4) from the desktop to another location. I am going to touch on a number of things all at once in pursuit of doing this very thing:

  1. make some assumptions
  2. create a new screenshots directory in a hosted storage solution
  3. link to that directory using a symlink (symbolic link [ln -s])
  4. change the default OS behavior to push the files out to that hosted storage directory
  5. follow up with housekeeping and related information

1. We will first assume that you are using a hosted storage solution like Google Drive. Some other options might include OwnCloud, or Dropbox. (Some may read into the absence of a link to Dropbox as some sort of slight. I would like to avoid that ambiguity: that is a slight. I trust them like I trust their deep-state-deferential parent Microsoft to keep my data safe from prying eyes. But you didn’t come here for a lecture, just a tutorial.)

2. Let’s create a new directory in Google Drive for your images (~/Google\ Drive/Pictures/screenshots). In terminal, enter the following:

cd ~/Google\ Drive
mkdir Pictures
cd Pictures
mkdir screenshots

3. At this point, let’s create a symlink (symbolic link) to screenshots:

ln -s ~/Google\ Drive/Pictures/screenshots ~/Pictures/screenshots

4. Now, let’s change the behavior of Mac OS X to write those screenshots to that new location in your hosted storage (or wherever else you determined to do it):

defaults write com.apple.screencapture location ~/Google\ Drive/Pictures/screenshots/

4.1. And in older versions of the Mac OS (Mac OS X) it was necessary to kill SystemUIServer (which will restart itself) in order to get this behavior to work.

killall SystemUIServer

However as of Mac’s present OS (macOS 10.12 Sierra) that is no longer necessary.

5.1. ⇧+⌘+4 or ⇧+⌘+⌃+4 will do a selective/partial capture. But pushing the space bar afterward (⇧+⌘+4,˽ or ⇧+⌘+⌃+4,˽) will allow you to select a single window (like alt+PrtScrn in Windows).

Additionally, there is much more about screenshot capture tweaking on TekRevue. It includes things like disabling the default drop shadow, renaming the files and changing the file format.