Bash script log file display to screen continuously Bash script log file display to screen continuously linux linux

Bash script log file display to screen continuously


Try the tail command:

tail -f filename


Another solution is

 less +F filename

or just less filename and typing "F" into it (pressing shift+f). It can be better than tail, because it allows you to cancel continuous printing temporary, go backward to look something and reenable it with "F" (shift+f) again


The watch command can also be of use.

watch tail logfile

Would show you the last 5 lines of the log file. It can be extended to any command which prints stuff to stdout.

Yes, using tail -f is the traditional solution, but depending on what you are trying to do, this might work better.