#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    125
    Rep Power
    27

    Tail -f with grep


    Hi,

    I want to monitor a file with "tail -f" but, only output specific grep matches.

    something like

    $> tail -f /var/logs/mail.log | grep -i "timing"

    That command doesn't work. can anyone suggest how to do this?

    Thanks.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4248
    Works for me. Perhaps your mail log doesn't receive as many entries with the word "timing" in it, so it isn't printing any??
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    125
    Rep Power
    27
    ummm. ok. so tried it again and it does work.

    Thanks for verifying!

IMN logo majestic logo threadwatch logo seochat tools logo