2

After running caffeinate with a command such as caffeinate -s -m -i -t 172800 &, how can I show the remaining time with a subsequent command

4

pmset -g assertions will show the caffeinate-generated assertion (among others) along with how many seconds remain:

   pid 23694(caffeinate): [0x0013076c0005a0ed] 00:37:55 PreventUserIdleDisplaySleep named: "caffeinate command-line tool" 
    Details: caffeinate asserting for 7200 secs
    Localized=THE CAFFEINATE TOOL IS PREVENTING SLEEP.
    Timeout will fire in 4924 secs Action=TimeoutActionRelease

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .