From log file into terminal in realtime
Solution 1:
If you want to follow a log file, you can use the famous:
$ tail -f /path/to/log/file
Solution 2:
In addition to tail -f
, you can also use less
with the +F
parameter, which will allow you to keep track of new new input, but at the same time have access to all interactive functions of less
, such as searching.
In some situations it is better to use tail -F
(or less --follow-name
) instead of tail -f
. This assures that you continue following new input even if the file name changes. It is especially useful with some log-rotating software.