linux (17) 数据选取命令

head(取出前几行)

[root@www ~]# head [-n number] 文件
  参数:
    -n:后面接数字,表示显示几行的意思。

[root@www ~]# head /etc/man.config

[root@www ~]# head -n 10 /etc/man.config

 

 

tail (取出后几行)

[root@www ~]# tail [-n number] 文件
  参数:
    -n:后面接数字,表示显示几行的意思。

[root@www ~]# tail /etc/man.config

[root@www ~]# tail -n 20 /etc/man.config

posted @ 2015-10-15 15:31  KAY02  阅读(118)  评论(0)    收藏  举报