1. tail -n 1 file.log

1 代表最后1行。file.log 是文件

扩展

  1. tail -n 1000:显示最后1000
  2. tail -n +1000:从1000行开始显示,显示1000行以后的
  3. head -n 1000:显示前面1000