Date: Fri, 8 Jun 2012 01:33:25 +0200 From: Polytropon <freebsd@edvax.de> To: Fbsd8 <fbsd8@a1poweruser.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: find date of last boot Message-ID: <20120608013325.d3eee7bb.freebsd@edvax.de> In-Reply-To: <4FD1360D.1060208@a1poweruser.com> References: <4FD1360D.1060208@a1poweruser.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 07 Jun 2012 19:15:25 -0400, Fbsd8 wrote: > dmesg command does not show date of last boot. > > Are there some other commands to find date of last boot? Check the lines in /var/log/messages. Unless you're not experiencing a newsyslog message (new log file started), the "kernel: Copyright (c) 1992-2011 The FreeBSD Project." string (first line of typical dmesg, check for your particular OS version!) indicates when the system was booted. But note that the date format is not the common sortable kind of `date "+%d.%m.%Y"`. Another idea (as already mentioned) is to subtract `uptime` from current `date`. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120608013325.d3eee7bb.freebsd>