Auto-Clean Old Files When a Disk Fills Up
This script checks how full a filesystem is with df . If it is at or above a percentage you set, it deletes files older than a chosen age from one directory you designate — typically a cache, spool, or temp directory — using find . Its purpose is to keep a disk from filling up unattended, not to be a general cleanup tool.













