![Forrest logo](/images/logo.png)
screencapture:tldr:4c46c
screencapture: Take a screenshot of a selected rectangular area.
$ screencapture -i ${filename-png}
try on your machine
The command "screencapture -i ${filename-png}" is used to take a screenshot on a macOS system.
- "screencapture" is the command-line tool provided by macOS for capturing screenshots.
- "-i" is an option that instructs the tool to capture only a selected portion of the screen interactively. It allows you to manually select the area you want to capture using your mouse.
- "${filename-png}" is a placeholder for the filename and format you want to save the screenshot as. In this case, it suggests using the variable "filename" and specifying the format as PNG (Portable Network Graphics).
To use this command, you would typically replace "${filename-png}" with the desired name for your screenshot. For example, if you want to save the screenshot as "myscreenshot.png", you would use the command "screencapture -i myscreenshot.png".
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.