Advertisement
erfanrocker

Delete Audit LOG bash Script

May 16th, 2022
911
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if [ "$(df -h | awk '$6=="/var/log/audit" {print $5}' | sed 's/%//g')" -gt 50 ]; then find /var/log/audit -type f -iname "audit.log.*" -mtime -3 -exec tar --remove-files -zcvf /var/log/audit_old/auditlog-`date +"%Y%m%d"`.tar.gz {} \; ; fi
Advertisement
RAW Paste Data Copied
Advertisement