/proc/uptime in Mac OS X

后端 未结 4 716
不知归路
不知归路 2021-02-08 19:55

I need the EXACT same output as Linux\'s \"cat /proc/uptime\".

For example, with /proc/uptime, you\'d get

1884371.64 38646169.12

4条回答
  •  日久生厌
    2021-02-08 20:51

    Got it...

    $sysctl -n kern.boottime | cut -c14-18
    87988
    

    Then I just converted that to readable format (don't remember how):

    1 Days 00:26:28

提交回复
热议问题