find date of last boot
Chris Hill
chris at monochrome.org
Fri Jun 8 01:35:20 UTC 2012
On Thu, 7 Jun 2012, Chris wrote:
> On 6/7/2012 8:14 PM, Chris Hill wrote:
>> On Thu, 7 Jun 2012, Fbsd8 wrote:
>>
>>> dmesg command does not show date of last boot.
>>>
>>> Are there some other commands to find date of last boot?
>>
>> That was fun. Google helped me with this; the crappy skillz are all mine.
-snip-
> Why create something that is already built in?
Because I learned something by doing it.
> As I mentioned previously, the last command lists when the system was
> rebooted.
I'm not sure it does:
$ last reboot
wtmp begins Fri Jun 1 08:31:38 EDT 2012
$ uptime
9:30PM up 529 days, 8:25, 4 users, load averages: 0.02, 0.18, 0.17
...and even so, would it show a cold boot, or only a reboot?
I'll credit Doug Hardie with the best solution:
$ ls -l /var/run/dmesg.boot
-rw-r--r-- 1 root wheel 7248 Dec 26 2010 /var/run/dmesg.boot
> Keep well,
You too.
--
Chris Hill chris at monochrome.org
** [ Busy Expunging </> ]
More information about the freebsd-questions
mailing list