Friday, December 1, 2017

/dev/sda2 full

1.you can df -hl check your status
2. if you install pm2, you can rm -rf ~/.pm2/logs/*
3. Create shell 
vi auto-del-30-days-ago-log.sh
find ~/.pm2/logs/ -mtime +30 -name "*.log" -exec rm -rf {} \;
crontab -e

10 0 * * * /your directory to shell/auto-del-7-days-ago-log.sh >/dev/null 2>&1

No comments:

Post a Comment