TIL

TIL about caffeinate a built-in macOS command-line tool that prevents your Mac from sleeping.

Some commands I use:

  • -d - prevent display sleep
  • -i - prevent system idle sleep
  • -m - prevent disk idle sleep
  • -u - declare that user is active
  • caffeinate -dt 600 - prevents display sleep for 10 minutes.
  • caffeinate -i script.sh - keeps system awake only while the script runs, then exits.

via Scott Knight