ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【shell】日志切割脚本

【shell】日志切割脚本

原创 Linux操作系统 作者:ringoo_ming 时间:2017-03-24 19:05:46 0 删除 编辑
日志切割脚本
  1. #!/bin/bash
  2. DIR=/app/weblogic/user_projects/domains/base_domain/
  3. d=`date +%Y%m%d%H`
  4. cd $DIR
  5. cp nohup.out ${d}nohup.out
  6. echo "" > nohup.out
  7. zip ${d}nohup.out.zip ${d}nohup.out
  8. mv ${d}nohup.out.zip logs/
  9. rm ${d}nohup.out

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31442725/viewspace-2136045/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
没啥特别的,就是一个搬砖人

注册时间:2017-03-10

  • 博文量
    40
  • 访问量
    114068