50 minutes ago · Tech · hide · 0 comments

If you’re starting a long job on your Apple Macintosh Computer and wandering off for a coffee, the machine may go to sleep before it finishes due to inactivity. To prevent that from happening, also give your computer a boost with the caffeinate command, a macOS built-in since 2012 (OS X Mountain Lion). Basic usage Pass your command to caffeinate as arguments: $ caffeinate ./migrate.sh In this wrapper form, caffeinate will run your command and keep the machine awake for as long as it runs, then let sleep resume as soon as it finishes. Bare usage For the quickest of caffeine fixes, you can run caffeinate on its own. It will hold the machine awake until you interrupt it with Ctrl-C: $ caffeinate ... ^C This is the form I have normally run when I have the realization but want to rush off to make my cuppa tea. Caffeinate a job that’s already running To skip the quick fix and allow your computer to rest after an already-running job finishes, use the -w option to caffeinate until a…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.