LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Tail help (https://www.linuxquestions.org/questions/linux-newbie-8/tail-help-4175507758/)

skoda 06-11-2014 02:00 PM

Tail help
 
Hai folks

i want to run the following as a tail -f. i mean i want to watch ftp logins in our server real time. how to do that?


Quote:

#egrep 'ftpd.*is now logged in' /var/log/messages | grep -v '__cpanel'
:)

szboardstretcher 06-11-2014 02:05 PM

Moving it around a bit and adding the line buffering option should do it:

Code:

tail -f /var/log/messages | grep --line-buffered 'ftpd.*is now logged in'

skoda 06-11-2014 03:25 PM

Quote:

Originally Posted by szboardstretcher (Post 5186510)
Moving it around a bit and adding the line buffering option should do it:

Code:

tail -f /var/log/messages | grep --line-buffered 'ftpd.*is now logged in'

YOur a genius!!!


All times are GMT -5. The time now is 11:58 PM.