On Sun, 2006-10-22 at 12:51 +0200, Hylton Conacher(ZR1HPC) wrote:
I see from the man page it is similar to tail -f. It says that it displays the last 10 lines but this grows as the log file grows ie #tailf /var/log/messages did start with 10 lines but then as the file was updated so the output became more lines ie
On executing the command: Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10
After a while: Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 Line 9 Line 10 Line 11 Line 12
How can I get it to display only 10 lines ie as #11 is added so #1 drops off?
watch tail -10 /var/log/messages The advantage with tailf over tail -f or watch is that it consumes less energy, which is why it's better on laptops running on battery power