head

显示文件的前5行

head -n 5 log2014.log

显示除文件最后6行的记录

head -n -6 log2014.log

原文地址:https://www.cnblogs.com/leehfly/p/7344433.html