What's new

Display boot time

smasher

Regular Contributor
Just thought I'd share this one-liner to display device boot-time.
Code:
date -d@$(( $( date +%s ) - $( cut -d. -f1 < /proc/uptime ) ))

Of course the output format can be customised with all of the usual format strings for "date".

Tested and working spectacularly on an AC68U. The displayed boot time may vary by one second between invocations, because the calculation is limited to one second of precision.
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top