log tips and tricks

              · ·

As engineers we’re constantly trawling through logs. Here’s some tips for making that task a little easier. Searching logs For larger logs we may want to scroll by page: cat mylog.log | less We can then use PgUp or PgDn or the mac equivalent. Regex search in less /<regex> Find error with grep $ grep -I error /var/log/messages or find firewall related stuff sudo tail -f /var/log/messages |grep FIREWALL