1.在logs目录下创建一个用来存放数据的文件 test.log,命令为

touch test.log

2.使用命令将catalina.out文件的最后n行输出到test.log中,命令为

tail -n catalina.out > test.log


如想要把最后10000行输出到test.log中,则使用

tail -10000 catalina.out > test.log


3、抓取文件
tail -f catalina.out > test.log


相关文章:

  • 2022-02-23
  • 2021-10-24
  • 2021-05-17
  • 2021-07-03
  • 2021-11-30
  • 2022-01-01
  • 2021-10-29
  • 2022-12-23
猜你喜欢
  • 2021-06-11
  • 2021-07-25
  • 2021-12-31
  • 2022-12-23
  • 2021-05-28
  • 2021-12-02
  • 2021-10-16
相关资源
相似解决方案