#!/bin/bash # log dmesg to local dmesg.log file with human readable time stamp while true; do sleep 1 dmesg -Tc >> dmesg.log; done