When did your Mac come out of sleep?

On Mac, like Linux and UNIX, you can use the uptime command to see how long your computer has been on.  Putting your computer to sleep does not reset this timer; it is time since boot.

But what if you want to see when your computer came out of sleep?

/usr/bin/pmset -g log | grep Wake | grep "due to" | tail -n1

Bam! Also tells you what woke the computer up.

Leave a Reply

Your email address will not be published. Required fields are marked *

To see if you are a human *

This site uses Akismet to reduce spam. Learn how your comment data is processed.