head命令
来源:原创 更新时间:2018-08-26 00:23:21 作者:管理员 浏览:1849
- 命令描述
- 命令语法
- 命令选项
-c<字符数>:指定显示头部内容的字符数;
-v:总是显示文件名的头信息;
-q:不显示文件名的头信息。
- 命令参数
- 命令实例
实例1:默认显示文件前10行
[root@linuxbaodian files]# head 01.txt She had been shopping with her Mom in Wal-Mart. She must have been 6 years old, this beautiful brown haired, freckle-faced image of innocence. What? Mom asked. Let's run through the rain! She repeated. No, honey. We'll wait until it slows down a bit. Mom replied. Don't you remember? When you were talking to Daddy about his cancer, you said, If God can get us through this, he can get us through anything! This young child waited about another minute and repeated: "Mom, let's run through the rain." We'll get soaked if we do. Mom said.
实例2:从文件头部显示前XX个字符
[root@linuxbaodian files]# head -c 20 01.txt She had been shoppin [root@linuxbaodian files]# head -c 100 01.txt She had been shopping with her Mom in Wal-Mart. She must have been 6 years old, this beautiful brow