• Mac OS X,  Mac OS X Server,  Mac Security

    Caffeinate Your Commands

    The caffeinate command is pretty cool. It keeps your computer from going to sleep. It can run in a couple of different ways. There’s a timer that prevents sleep for a little while. You can also run another command from within caffeinate that keeps the system awake until the other command is finished. Here, we’ll scp a file called source file to a host called servername and keep the system from going to sleep until the process is finished: caffeinate -s scp sourcefile me:servername/targetfile Here, we’ll just use the boring command to tell the computer not to go to sleep for an hour: caffeinate -t 3600 &

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    A Well Caffeinated Command Line

    One of the big things in OS X Mountain Lion is how the system handles sleeping and sleeping events. For example, Power Nap means that now, Push Notifications still work when the lid is shut provided that the system is connected to a power source. This ties into Notification Center, how the system displays those Push Notifications to users. Sure, there’s tons of fun stuff for Accessibility, Calendar, contacts, Preview, Messages, Gatekeeper, etc. But a substantial underpinning that changed is how sleep is managed. And the handling of sleep extends to the command line. This manifests itself in a very easy to use command line utility called caffeinate. Ironically, caffeinate…