Linux查看文件开头内容


 description

在linux中查看test.txt文件前12行内容

 command

head -v -n 12 test.txt 

 parameter

head :  默认打印文件前10行内容
-v :  打印文件名称标题
-n :  指定打印行数

 result

==> test.txt <==
1
2
3
4
5
6
7
8
9
10
11

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.