Shell Data Processing - tail utility


tail is a filter program that prints the last ten lines of a standard input stream or a file. (Handy when viewing log files for diagnostic).

tail file.txt

The inverse program is the head program that prints the first lines.

It's part of the gnu utility package.

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)

Powered by ComboStrap