免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1066 | 回复: 0
打印 上一主题 下一主题

head命令用法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-04 17:18 |只看该作者 |倒序浏览

                NAME
       head - 输出文件开头的部分
SYNOPSIS
       head [OPTION]... [FILE]...
DESCRIPTION
       Print  the  first  10 lines of each FILE to standard output.  With more
       than one FILE, precede each with a header giving the file  name.当不止要显示一个文件的时候,会在显示的每个文件前面显示文件名,例如==> filename <==
   With no FILE, or when FILE is -, read standard input.当后面没有指定文件名或者是-的时候,从标准输入读入数据显示
       Mandatory  arguments  to  long  options are mandatory for short options
       too.较长的选项的命令参数对于较短的选项也是命令的
       -c, --bytes=[-]N字符
              print the first N bytes of each  file;  with  the  leading  ‘-’,
              print all but the last N bytes of each file
       -n, --lines=[-]N行
              print  the first N lines instead of the first 10; with the lead‐\n              ing ‘-’, print all but the last N lines of each file
       -q, --quiet, --silent当显示多个文件的时候不列出文件名
              never print headers giving file names
       -v, --verbose
              always print headers giving file names
       --help display this help and exit
       --version
              output version information and exit
       N may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M
       1024*1024,  GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E,
       Z, Y.在N后面可以跟后缀的,也就是单位了,例如head -c4b filename就是列出filename的头4b长度的字符
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/85268/showart_1679722.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP