Linux Today: Linux News On Internet Time.

Sysadmin tools: Viewing text in Linux with tail and head

Apr 21, 2020, 13:00 (0 Talkback[s])
(Other stories by Amit Waghmare)

There are many commands to view the contents of files in Linux. Among those, the tail and head commands print the output of the last and first ten lines of a file, respectively. In some cases, the output or error of your submitted job or script creates a very big file and the most recent result prints at the end of the file. You can use tail, instead of the cat command, to just view the last few lines of the file. Sometimes you need multiple options with the tail command to view the contents of the file correctly.

Complete Story