2019-02-26 03:08:32 +00:00
|
|
|
|
# caffeinate
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 防止 Mac 进入休眠模式。
|
2024-01-31 10:20:27 +00:00
|
|
|
|
> 更多信息:<https://keith.github.io/xcode-man-pages/caffeinate.8.html>.
|
2019-02-26 03:08:32 +00:00
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 防止进入休眠模式 , 1 小时内(3600 秒):
|
2019-02-26 03:08:32 +00:00
|
|
|
|
|
|
|
|
|
`caffeinate -u -t {{3600}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在指定命令执行完前,禁止进入休眠:
|
2019-02-26 03:08:32 +00:00
|
|
|
|
|
|
|
|
|
`caffeinate -s {{命令}}`
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
- 在你按 Ctrl-C 之前禁止进入休眠模式:
|
2019-02-26 03:08:32 +00:00
|
|
|
|
|
|
|
|
|
`caffeinate -i`
|