I'm going to create my "exec_reattach_to_Screen" alias soon, but one of the things it should do is: 1) check to see if the GNU Screen session exists already, and 2) if it doesn't, then print out the last boot time in two formats: 2a) the full time, and 2b) the "human-readable" time, e.g. "2 days 3 hours ago".
To get the full time of the last boot, the user can run uptime -s or who -b or grep ^btime /proc/stat. A Perl script should be able to parse this easily.
The overall goal of this is just to make it quick to know when the last system reboot was, on systems that reboot semi-regularly.
I'm going to create my "exec_reattach_to_Screen" alias soon, but one of the things it should do is: 1) check to see if the GNU Screen session exists already, and 2) if it doesn't, then print out the last boot time in two formats: 2a) the full time, and 2b) the "human-readable" time, e.g. "2 days 3 hours ago".
To get the full time of the last boot, the user can run
uptime -s
orwho -b
orgrep ^btime /proc/stat
. A Perl script should be able to parse this easily.The overall goal of this is just to make it quick to know when the last system reboot was, on systems that reboot semi-regularly.