Use `caffeinate /path/to/executable` to prevent system from sleeping until executable is completed.
Use `caffeinate -dimsu` to prevent disk and display sleep, too.
Keep your computer awake for 1 hour:
caffeinate -t 3600 &
Keep your computer from idling until a Terminal command finishes
caffeinate -i long_running_script.sh
-i prevents “idle sleeping.” Other options include:
-djust prevents the display from sleeping
-mjust prevents disks from sleeping when idle
-skeeps the whole system awake
Wake up your computer
caffeinate -u -t 1