macOS 定时截图:screencapture -T 用法

设置倒计时后自动截图,方便先打开菜单或悬停提示再拍摄。

macOSmacOS截图文件命令行低风险
运行 screencapture -T 5 -x ~/Desktop/timed-shot.png,5 秒后静默截图并保存。

01命令

命令
$ screencapture -T 5 -x ~/Desktop/timed-shot.png

02作用说明

-T <秒数> 会在指定延迟后截图,相当于老 Grab 工具的定时器:先运行命令,再从容打开下拉菜单、悬停提示或想要的窗口布局。-x 表示不播放快门声,适合公共环境与脚本。它还能与其他参数组合,例如 -T 5 -c 会把延时截图直接送入剪贴板而不写文件。

03风险

风险低风险
使用条件Screen Recording permission for the calling Terminal app (macOS 10.15+).

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • screencapture - Create a screenshot of the display
    SS64 · technical · 2026-09-17
    依据: Documents `-T <seconds>` (timer) with the usage example `-T 10 -C ~/screencap1.png`, and `-x Do not play sounds.`
  • screencapture(1) man page
    Xcode Man Pages (keith.github.io) · technical · 2026-09-17
    依据: Man page for screencapture listing `-T <seconds>` among its options: take the screenshot after the given delay.

最后验证: 2026-09-19 · 分类: 媒体

06相关方案