Advertisement
gaspar_fm

Dmesg with full date

Mar 11th, 2013
1,402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. # dmesg with full date
  2.  
  3. base=$(cat /proc/uptime | cut -d ‘.’ -f1); seconds=`date +%s`; dmesg | sed 's/^\[\(.*\)\..*\]\(.*\)$/\1\n\2/' | while read first; do read second; first=`date +"%d/%m/%Y %H:%M:%S" --date="@$(($seconds - $base + $first))"`; echo "[$first] $second"; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement