Capture a Screen Region to a File with screencapture -R
Screenshot an exact x,y,width,height rectangle silently, ideal for scripts and repeatable documentation shots.
01Command
$ screencapture -x -R 100,100,900,600 ~/Desktop/crop.png02What it does
The -R flag takes a rectangle in x,y,width,height order measured from the top-left of the main display, so you can re-shoot the exact same area after UI changes — perfect for before/after comparisons and automated docs. -x suppresses the shutter sound for silent capture in shared spaces or scripts. The output file format follows the extension you give (.png, .jpg, .tiff). For Retina displays the saved file is in pixels at 2× scale unless you post-process.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- screencapture - Create a screenshot of the displayEvidence: Documents `-x Do not play sounds.` and `-R <x,y,w,h>`: capture a rectangle using format x,y,width,height.
- screencapture(1) man pageEvidence: Man page for screencapture listing `-R<x,y,w,h>` (capture a rectangle at the given coordinates) and `-x` (do not play sounds) among its options.
Last verified: 2026-09-19 · Category: Media
06Related solutions
Point macOS screen captures at any folder you choose instead of the desktop.
List the biggest files in your home folder that are eating disk space.
Make Finder display .pdf, .docx, .png and every other extension at all times.