每天回顾linux命令(head)
2017-11-12 13:25
267 查看
head命令
head命令用于显示文件的开头的内容。在默认情况下,head命令显示文件的头10行内容。
语法
head (选项) (参数)
选项
-n number :指定显示头部内容的行数。
-c number:指定显示头部的字符数。
-q:不显示文件名
-v:总是显示文件名的头信息,默认
参数
文件列表:指定显示头部内容的文件列表。
head命令用于显示文件的开头的内容。在默认情况下,head命令显示文件的头10行内容。
语法
head (选项) (参数)
选项
-n number :指定显示头部内容的行数。
root@68fc0a9bc6dd:/home/wzm/testtail# head redis.conf -n 3 # Redis configuration file example. # # Note that in order to read the configuration file, Redis must be
-c number:指定显示头部的字符数。
root@68fc0a9bc6dd:/home/wzm/testtail# head redis.conf -c 10 # Redis coroot@68fc0a9bc6dd:/home/wzm/testtail#
-q:不显示文件名
root@68fc0a9bc6dd:/home/wzm/testtail# head -n 3 -q redis.conf README.md # Redis configuration file example. # # Note that in order to read the configuration file, Redis must be This README is just a fast *quick start* document. You can find more detailed documentation at http://redis.io. What is Redis?
-v:总是显示文件名的头信息,默认
root@68fc0a9bc6dd:/home/wzm/testtail# head -n 3 -v redis.conf README.md ==> redis.conf <== # Redis configuration file example. # # Note that in order to read the configuration file, Redis must be ==> README.md <== This README is just a fast *quick start* document. You can find more detailed documentation at http://redis.io. What is Redis? root@68fc0a9bc6dd:/home/wzm/testtail#
参数
文件列表:指定显示头部内容的文件列表。
相关文章推荐
- 每天回顾linux命令(time)
- 每天回顾linux命令(reboot)
- 每天一个linux命令(14):head 命令
- 每天一个linux命令(4):head命令
- 每天一个linux命令(14):head 命令
- 每天一个linux命令(14):head 命令
- 每天一个Linux命令(14):head
- 每天一个linux命令(14):head 命令
- 每天回顾linux命令(id)
- 每天一个linux命令(14):head 命令
- 每天回顾linux命令(du)
- 每天回顾linux命令(df)
- 每天一个 linux 命令(14):head 命令---学习笔记
- 每天回顾linux命令(chgrp)
- 每天学习一个linux命令(14):head 命令
- 每天回顾linux命令(umask)
- 每天回顾linux命令(chmod)
- 每天回顾linux命令(iotop)
- 每天一个linux命令(14):head 命令
- 每天回顾linux命令(unzip)