find date of last boot

Matthew Seaman m.seaman at
Fri Jun 8 06:19:37 UTC 2012

On 08/06/2012 05:50, Randal L. Schwartz wrote:
> Sure, but the question was likely involving a stock system, so yes, your
> mileage may vary, but let's consider a solution that works for a default
> system.  "last reboot" isn't it.

It's not that.  'last reboot' seems to be broken at the moment, at least
on stable/9:

lucid-nonsense:~:% uname -a
9.0-STABLE #15 r236465: Sat Jun  2 23:14:59 BST 2012
root at

I rebooted a few days ago:

lucid-nonsense:~:% uptime
 7:14AM  up 3 days,  8:18, 1 user, load averages: 0.03, 0.01, 0.01

And the utx.log file was last rotated over a week ago:

lucid-nonsense:~:% ls -la /var/log/utx*
-rw-r--r--  1 root  wheel    394 Jun  7 17:51 /var/log/utx.lastlogin
-rw-r--r--  1 root  wheel  16841 Jun  8 07:06 /var/log/utx.log
-rw-r--r--  1 root  wheel  24878 May 31 22:41 /var/log/utx.log.0
-rw-r--r--  1 root  wheel  13741 Apr 30 08:50 /var/log/utx.log.1
-rw-r--r--  1 root  wheel  27886 Mar 31 22:52 /var/log/utx.log.2

but last(1) isn't coming up with the goods:

lucid-nonsense:~:% last reboot

wtmp begins Fri Jun  1 06:14:46 BST 2012

(nor does it work if I tell last to use the older utx.log files)



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
JID: matthew at               Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-questions mailing list