gregs

tail | grep

by gregs on Jun.30, 2005, under Uncategorized

After reading a quote on a mailing list last week about the concept behind unix tools and their focus on doing one task well and the OS allowing you to pipe several commands in one go, it dawned on me that I could do the following on log files:

CODE:
  1. tail -f /var/log/syslog | grep "named"

So as the log fills up only items where the pattern "named" is found are displayed. Very neat!


5 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!