卡饭网 > 其他 > 正文

head命令的用法是什么?

来源:本站整理 作者:梦在深巷 时间:2016-05-03 22:08:22

小编先给大家普及一下什么是head命令:
1、<head> 标签用于定义网页文档的头部,它是所有头部元素的容器。
2、<head> 中的元素可以引用脚本、指示浏览器在哪里找到样式表、提供元信息等等。
3、文档的头部描述了文档的各种属性和信息,包括文档的标题、在 Web 中的位置以及和其他文档的关系等。绝大多数文档头部包含的数据都不会真正作为内容显示给读者。
head命令用于显示文件的开头的内容。在默认情况下,head命令显示文件的头10行内容。

-n<数字>:指定显示头部内容的行数;
-c<字符数>:指定显示头部内容的字符数;
-v:总是显示文件名的头信息;
-q:不显示文件名的头信息。

小编为大家找到了相关的head命令用法,希望大家可以通过如下的内容能够更好的理解。
NAME
head - output the first part of files

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. 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-
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, k 1024, m 1024*1024.

相关推荐