macOS 定时截图:screencapture -T 用法
设置倒计时后自动截图,方便先打开菜单或悬停提示再拍摄。
运行 screencapture -T 5 -x ~/Desktop/timed-shot.png,5 秒后静默截图并保存。
01命令
命令
$ screencapture -T 5 -x ~/Desktop/timed-shot.png02作用说明
-T <秒数> 会在指定延迟后截图,相当于老 Grab 工具的定时器:先运行命令,再从容打开下拉菜单、悬停提示或想要的窗口布局。-x 表示不播放快门声,适合公共环境与脚本。它还能与其他参数组合,例如 -T 5 -c 会把延时截图直接送入剪贴板而不写文件。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- screencapture - Create a screenshot of the display依据: Documents `-T <seconds>` (timer) with the usage example `-T 10 -C ~/screencap1.png`, and `-x Do not play sounds.`
- screencapture(1) man page依据: Man page for screencapture listing `-T <seconds>` among its options: take the screenshot after the given delay.
最后验证: 2026-09-19 · 分类: 媒体