#!/bin/bash
killall -SIGUSR1 mongod
#会自动生成类似/data/mongo/mongo/log/mongod.log.2016-01-28T06-06-59的文件然后重新起一个文件做日志
sleep 10
#删除7天前的文件
find /data/mongo/mongo/log/ -type f -mtime +7 -delete
上一篇:比较MongoDB在公有云上的性能:AWS、Azure和Digital Ocean
下一篇:MongoDB 3.2 版本说明(Release Notes for MongoDB 3.2)