This is an old topic but here is the script that allowed me to retrieve
the desired information. #!/bin/bash # Retrieving the date and time of
the last rebootlast_reboot=$(sysctl -n kern.boottime | awk -F'[ ,]'
'{print $4, $5}') # Formatting the outp...