2019-02-26 03:08:32 +00:00
|
|
|
|
# caffeinate
|
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
|
> 防止 Mac 进入休眠模式。
|
2021-08-23 20:33:24 +01:00
|
|
|
|
> 更多信息:<https://ss64.com/osx/caffeinate.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`
|