Tail

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Tips

Removing Lines You Don't Want to See

Let's saty you are tailing a log and you get a bunch of warning messages you don't want to see. If so, just pipe the tail to grep -v pattern.

tail -f foo.log | grep -v "Stupid Warning I Don't Want To See"

The -v option inverts the selection of grep, grabbing only those lines that don't match the expression.