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/fileNote: to end watching press ctrl^c (ctrl+c)
Where:
-n 1causes refreshing once per second-n 10causes reading 10 last lines from file
2. less command
$ less +F path/to/fileNote: 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.