tldr/pages/osx/caffeinate.md

25 lines
531 B
Markdown
Raw Normal View History

# caffeinate
> Prevent macOS from sleeping.
> More information: <https://keith.github.io/xcode-man-pages/caffeinate.8.html>.
2017-12-01 06:59:56 +00:00
- Prevent from sleeping for 1 hour (3600 seconds):
2017-12-01 06:59:56 +00:00
`caffeinate -u -t {{3600}}`
2017-12-01 06:59:56 +00:00
- Prevent from sleeping until a command completes:
2022-02-14 11:21:43 +00:00
`caffeinate -s "{{command}}"`
2017-12-01 06:59:56 +00:00
- Prevent from sleeping until a process with the specified PID completes:
`caffeinate -w {{pid}}`
2022-10-21 05:19:50 +01:00
- Prevent from sleeping (use `Ctrl + C` to exit):
2017-12-01 06:59:56 +00:00
`caffeinate -i`
2022-10-21 05:19:50 +01:00
- Prevent disk from sleeping (use `Ctrl + C` to exit):
`caffeinate -m`