Overview: head command is used to display file text blocks(Recommended learning: web front-end video tutorial)
1. Format
head [Parameter] [File]
2. Parameter
-q Hide file name
-v Display file name
-c
-n
3. Example
#创建文件 head.txt cat > head.txt<<EOF > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > 11 > 12 > EOF
#显示前5行 head -n 5 head.txt
#显示前5个字节 head -c 5 head.txt
The above is the detailed content of Detailed explanation of linux head command. For more information, please follow other related articles on the PHP Chinese website!