Monday, October 22, 2012

Mac OSX Terminal : Prevent your mac from falling asleep


caffeinate -i -s /bin/ssh ...
Explanation:
-i - Prevent idle sleep.
-s - Prevent system sleep (entirely, even if you close the lid). Note: it only works while on AC power.
/bin/ssh - Just keep writing the command you want to execute. Using ssh directly instead of/bin/ssh should also work.
Results: Your system will not sleep as long as the ssh command is running.

No comments:

Post a Comment