as all know with uptime we can capture the days that machine is up
# uptime
12:08:19 up 93 days, 14:12, 1 user, load average: 0.38, 0.36, 0.40
what we actually need is to know the date of the reboot / restart
for example - 21/5/2016 12:98
uptime command not have the right flags to do that , so maybe with other commands ?
but after google searching I not find what I want ,
So I will happy to get any suggestion
who -b
will show the last boot time.You can get it to the nearest day with:
Further parsing of the output of date to extract the hours and minutes