How to view the last few lines of a file in linux

Introduction

In linux, you can use the tail command to view the content of the last few lines of the file

Command Line

View the last 3 lines of the target.txt file

tail -3 target.txt

Parameter

parameterIntroduction
tailPrint the last 10 lines of each FILE to standard output.
-noutput the last NUM lines, instead of the last 10.

operation result

8
9
10