Skip to content

Instantly share code, notes, and snippets.

@tuksik
Created September 16, 2014 09:19
Show Gist options
  • Save tuksik/471650d24710aa232f5c to your computer and use it in GitHub Desktop.
Save tuksik/471650d24710aa232f5c to your computer and use it in GitHub Desktop.
Last reboot
uptime | \
perl -ne '/.*up +(?:(\d+) days?,? +)?(\d+):(\d+),.*/; $total=((($1*24+$2)*60+$3)*60);
$now=time(); $now-=$total; $now=localtime($now); print $now,"\n";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment