Linux - tail command

> Operating System - Kernel (Windows, Unix, Linux) > Linux / Unix

1 - About

tail is a command that prints the last ten lines of a file. (Handy when viewing log files for diagnostic).

tail file.txt

The head command prints the 10 first lines.


3 - Monitoring a file

Use the -f option:

tail -f file.txt

you get to see the end of the file peridocially (logfiles are good candidate)