tail -f x.log
I use this command to see a growing log file in the command prompt.
I am interested only in seeing the log lines that are written to the file after running tail -f
and not interested in the logs that were written to the file before doing tail -f
. But tail -f
command on start, takes the last 10 lines and displays it.
This confuses me, at times if these logs are freshly generated (or) they are old logs?
So, how can i customize tail -f to output only the new entries?
Best Answer
You can try:
From man page: