//screenshot entire screen, named ‘test.jpg’ in current working Terminal directory
screencapture test.jpg
// change path
screencapture ~/Desktop/screenshot.jpg
// copy to clipboard
screencapture -c
// specify file type
screencapture -t tiff sample.tiff