wc -l 统计日志有多少行
wc -c 统计日志多少字节
wc -w 统计日志多少字
sed -n 'n,mp' error.log 查看日志n到m行
cat filename | tail -n 1000 查看最后1000行的数据
cat filename | head -n 3000 | tail -n +1000 查看1000到3000行的数据
cat filename 打印文件所有内容
tail -n 1000 打印文件最后1000行的数据
tail -n +1000 打印文件第1000行开始以后的内容
head -n 1000 打印前1000的内容