DeeNewcum / dotfiles

my personal config files
12 stars 4 forks source link

show uptime quick-summary after reboot #23

Open DeeNewcum opened 1 year ago

DeeNewcum commented 1 year ago

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.