1

I dont find anything about this yet. I need a program that save the time that the MAC was turned on and off. How do I do this in code? A Java or C++ solution would be preferred, but I will accept any.

Any idea?

suuuzi
  • 602
  • 1
  • 8
  • 19

1 Answers1

1

check out the 'last' command which show you when the pc was rebooted etc..

see also https://unix.stackexchange.com/questions/7760/output-of-the-last-command

Community
  • 1
  • 1
ShoeLace
  • 3,476
  • 2
  • 30
  • 44