1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-05 08:55:23 +02:00
tldr/pages/osx/caffeinate.md

25 lines
549 B
Markdown
Raw Normal View History

# caffeinate
> Prevent macOS from sleeping.
> More information: <https://keith.github.io/xcode-man-pages/caffeinate.8.html>.
- Prevent the display from sleeping:
`caffeinate -d`
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}}`
- Fork a process, exec "make" in it, and prevent sleep as long as that process is running:
`caffeinate -i make`
2017-12-01 06:59:56 +00:00
- Prevent from sleeping until a process with the specified PID completes:
`caffeinate -w {{pid}}`
- Prevent disk from sleeping (use `<Ctrl c>` to exit):
2022-10-21 09:49:50 +05:30
`caffeinate -m`