ops - 删脚本

访问量: 110

  1 # 自动删除log
  2 0 0 * * * sh /opt/shell/auto_remove_log.sh
  3 0 4 * * * echo '' > /opt/app/www.io/current/log/daemons/amqp_matching.log
  4 0 4 * * * echo '' > /opt/app/www.io/current/log/daemons/amqp_order_processor.log
  5 0 4 * * * echo '' > /opt/app/www.io/current/log/daemons/amqp_slave_book.log


$ cat /opt/shell/auto_remove_log.sh
find /opt/app/www..io/current/log/ -mindepth 1 -mtime +2 -delete
find /opt/app/www..io/current/log/update_orders_to_websockets_*.log  -mtime +0 -delete
find /opt/app/www..io/current/log/amqp_daemon_*.log  -mtime +0 -delete
find /opt/app/services..io/current/log/ -mindepth 1 -mtime +2 -delete
echo 'delete log success !'

订阅/RSS Feed

Subscribe

分类/category