Just thought I'd share this one-liner to display device boot-time.
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.
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: