head,tail

测试文件headtail

1 L
2 L
3 L
4 L
5 L
6 L
7 L
8 L
9 L
10 L
11 L
12 L
13 L
14 L
15 L
16 L
17 L
18 L
19 L

$head -n filename显示文件的前n行内容,缺省显示前10行

$head -2 headtail 
1 L
2 L

tail

显示文件后n行内容,缺省显示后10行

$tail -2 headtail 
18 L
19 L
posted @ 2016-10-13 21:17  Abnor  阅读(255)  评论(0编辑  收藏  举报