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.

Advertising

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)

os/linux/tail.txt · Last modified: 2018/09/16 12:42 by gerardnico