![Forrest logo](/images/logo.png)
screencapture:tldr:e03a7
screencapture: Take a screenshot and save it to a file.
$ screencapture ${filename-png}
try on your machine
The command "screencapture ${filename-png}" is used to capture a screenshot or screen recording on a device. The term "${filename-png}" is a placeholder for the desired file name and format.
When using this command, you need to replace "${filename-png}" with an actual file name and provide the desired image format extension (such as ".png"). For example, if you want to save the screenshot as "myscreenshot.png", you would execute the command as "screencapture myscreenshot.png".
After executing the command, the operating system will capture the contents of the screen and save it as the specified file with the chosen image format.
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.