Why did I do this; been getting both the Pi-hole-ftl log and the os syslog taking 100% of the the root partition space. I only notice the problem when I get ads on my devices that should not. Go to the console and see issues. To find that the update fails due to the root vol being full.
A couple of items needed: swaks, a crontab entry, a g-mail app pw, and this script.
- Installing swanks:
sudo apt install swaks - Adding a crontab as root (below is what I used) - lots of help with adding the job, mine every day at 1am
0 1 * * * $HOME/scripts/disk-usage.sh - Create an app pw for your g-mail account. I use g-mail, so that is what my code does other have similar abilities
- This script placed under /root/scripts/disk-usage.sh with the execute bit set (chmod -x /root/scripts/disk-usage.sh)
Disk_Usage.txt (2.9 KB)
Please let me know if you have questions of if helped you...