Skip to Content

Autoblog reviews all the hottest cars
AOL Tech

Filed under: How-tos, Terminal Tips

Terminal Tip: 6 easy ways to capture your screen

OS X's built in screencapture command provides a simple command-line utility to snap images of your desktop. It offers quite a few options and many of them do not quite work as advertised. Even the manual page admits that screencapture is "not very well documented to date".

To make it easier for you to jump in and get started with screencapture, here are six convenient already-tested variations that you can copy, paste and use. Consider adding these capture methods to shell scripts, to system calls from AppleScript or just running them directly from the command line as needed.

1. Capture your primary screen as a (default) png file.
% screencapture ~/Desktop/screencap.png

2. Capture your primary screen as a jpeg (-tjpeg), including the cursor (-C)
% screencapture -C -tjpeg ~/Desktop/mycapture.jpg

3. Wait for five seconds before capturing the screen.
% sleep 5; say "ready"; screencapture ~/Desktop/mycapture.png

4. Interactively (-i) select (-s) an area of your screen with the mouse.
% screencapture -i -s -tjpeg ~/Desktop/mycapture.jpg

5. Interactively (-i) select a window with the mouse. When the crosshairs appear after issuing this command, press the space bar then select a window with the camera.
% screencapture -i -tjpeg ~/Desktop/mywindow.jpg

6. Select an area of your screen and copy it to the clipboard (-c) rather than a file.
% screencapture -i -s -c

Reader Comments (Page 1 of 1)

Tip of the Day

Holding the Command key (aka the Apple key) and pressing Tab will cycle through your open applications. It's easier to Cmd-Tab if you are Copy (Cmd-C) and Pasting (Cmd-V) to and from various applications.


Follow us on Twitter!
TUAW [Cafepress]

Sponsored Links

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Google Earth for iPhone
Podcaster
AT&T Navigator Road Test
Bento for iPhone 1.0
Scrabble for iPhone
Tom Bihn Checkpoint Flyer Briefcase
Apple Vanity Plates
Apple booth Macworld 07
WorldVoice Radio
Quickoffice for iPhone 1.1.1
Daylite 3.9 Review
DiscPainter
Mariner Calc for iPhone
2009CupertinoBus
Crash Bandicoot Nitro Kart 3D
MLB.com At Bat 2009
Macworld Expo 2007 show floor
Apple Texas Hold 'Em

 

More Apple Analysis

AOL Radio TUAW on Stitcher