EN
Bash - how to follow log file changes?
10
points
There are few solutions:
1. tail
+ watch
commands:
$ watch -n 1 tail -n 10 path/to/log/file
Note: to end watching press ctrl^c (ctrl+c)
Where:
-n 1
causes refreshing once per second-n 10
causes reading 10 last lines from file
2. less
command
$ less +F path/to/file
Note: to end watching press ctrl^c (ctrl+c); to exit less program press q key.
It is possible to enable following for opened less program by pressing shift+f keys.