Examples (6)
Take a screenshot and save it to a file
screencapture path/to/file.pngTake a screenshot including the mouse cursor
screencapture -C path/to/file.pngTake a screenshot and open it in Preview, instead of saving
Take a screenshot of a selected rectangular area
screencapture -i path/to/file.pngTake a screenshot after a delay
screencapture -T seconds path/to/file.pngMake a screen recording and save it to a file
screencapture -v path/to/file.mp4made by @shridhargupta | data from tldr-pages