clear_cron_logs.sh 193 B

1234567891011
  1. #!/usr/bin/env bash
  2. if [ $(du -m /var/log/cron.log | cut -f 1) -gt 500 ]
  3. then
  4. cat /dev/null > /var/log/cron.log
  5. # echo "More than 500M"
  6. # else
  7. # echo "Less or equal than 500M"
  8. fi