Harikrishnan Harikrishnan - 5 months ago 40
Linux Question

How to show only newly logged content in tail -f?

normally tail -f shows 10-15 already logged content.How can I avoid it? I only want to see newly logged content.Is there any switch in tail for that.Please advice.


Simply set to return zero lines:

tail -n 0 -f /var/log/syslog

man tail:

   -n, --lines=K
          output the last K lines, instead of the last 10; or use -n +K to output lines starting with the Kth