码迷,mamicode.com
首页 > 系统相关 > 详细

linux命令-head

时间:2016-01-30 03:10:29      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:linux命令-head

head :output the first part of files  :输出文件首部

head选项:

    -c ,--bytes=[-]k  :print the first K bytes of each  file;  with  the  leading  ‘-’,print all but the last K bytes of each file : 打印文件前k个字符,必须有k值,-k表示打印文件至倒数第k个字符位置,第k个字符会被打印出来。

    -n ,--lines=[-]K  :print  the first K lines instead of the first 10; with the leading ‘-’, print all but the last K lines of each file  :不加k也行,默认打印10行,-k用法同-c中的-k相同。

    


linux命令-head

标签:linux命令-head

原文地址:http://fbzl1990.blog.51cto.com/9276609/1739911

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!