tail -f <log file > | grep <thing you want to search for >
So what tail -f does is it will output the tail of the log file, and the -f switch will not stop the tail but instead it will keep the log file open which means you can watch logs happen in real time. And then you pipe it to grep which search for the thing you want to search for. Easy? I know its a life helps me do my job a little easier :)
No comments:
Post a Comment