开发者

Time of shutdown on Mac OS X [duplicate]

This question already has answers here: Closed 13 years ago.

Possible Duplicate:

Receiving power notifications (especially shutdown) on Mac OSX

Hi Guys,

I'd like 开发者_Python百科to be able to log the times that my mac is switched on and off during the day (keeping track of my hours jacked-in). Switched on is easy: I just have a tiny script that writes the time to a logfile when the user logs on, but I can't find a way of record the time that the Mac powers down.

Any Ideas? I'm not particularly bother about non-standard shutdowns and the like, just really want to get a small script to run on shutdown...

Thanks,

Joe


If you are just interesting it the dates of the events (not necessarily running a script), try last reboot shutdown in Terminal.

The “reboot” entries are when the system was started. The “shutdown” entries are when it was shutdown.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜