阅读377 返回首页    go iPhone_iPad_Mac_apple


Time stamp of last boot

I have been trying to determine the best way to get a full timestamp for the last time of system startup (in Terminal.)

I pulled the timestamp from 

“ls -1lnUT /var/run/utmpx”

Is there a better method, or, is there a situation where this method would not work?

Thank you in advance.



who -b



Your example appears to report the same time:

 

iMac06:~ john$ who -b

reboot   ~        Sep  2 15:49

iMac06:~ john$ ls -1lnUT /var/run/utmpx

-rw-r--r--@ 1 0  1  4396 Sep  2 15:49:34 2017 /var/run/utmpx

iMac06:~ john$



最后更新:2017-09-08 09:10:26

  上一篇:go Split view with new document replacing one side
  下一篇:go Sierra Upgrade In