how to continuously display a file of its last several lines of contents

I use this function all the time to monitor a log file in another terminal window.

tail -f <filename>

I recommend taking it a step forward to look for particular text in the log. Great if you are only interested in seeing some particular entry being written to the file.

tail -f <filename> | grep <keyword or pattern>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)