Skip to content

Tail Command⚓︎

The TAIL command is used to display the last n lines of a specified file. By default the tail command displays the last 10 lines of a file. This can be changed by using the -n argument and specifying a new value. If the specified file does not contain at least n lines then a the .bak version of the file will be prepended, if it exists.

Here is an example of the command displaying the contents of a jniorsys.log

You can also set an amout to how many lines are displayed with -n, followed by the line amount you want

Another powerful feature of the tail command is its ability to monitor and display file changes in real-time using -f. The specified file is monitored for changes once a second and only the changed portion of the file is displayed.