[olug] Uptime to boot date --(simple method)

VincentR vincentr at cox.net
Wed Oct 30 22:21:15 UTC 2002


Here's the easiest way I know:
One simple line  :)

date -d "-`cat /proc/uptime | cut -d\  -f1 | cut -d. -f1` seconds"


----- Original Message ----- 
From: "Jon H. Larsen" <relayer at omahadirect.net>
To: <olug at olug.org>
Sent: Tuesday, October 29, 2002 11:27 AM
Subject: [olug] Uptime to boot date


> 
> 
> Anyone know a quick way how I can turn the uptime output into an actual 
> date/time of the last boot?  Would it be the date command?
> 
> [~]$ uptime
>  11:25am  up 493 days,  2:41
> 
> Jon L.
> 
> -- 
>  [ Jon H. Larsen  - email: relayer at omahadirect dot net         ]
>  [ ICQ#: 10412618 - http://www.animesunday.org/jonl               ]
>  [ PGP Pubkey - http://www.animesunday.org/jonl/relayerpubkey.txt ]
> 
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug




More information about the OLUG mailing list