I have a system that continually runs out of disk space. Im going to write a script that cleans up directories that grow larger. Usually these are log directories. Given the nature of the machine, i dont need to keep logs.
I want to write a script that shows me all the directories that are increasing in size, so i can make sure this list goes to 0.
I am thinking something like this
1. du / 2. wait 24 hrs 3. du / 4. find all instances where the file size increased
It looks simple enough, but my issue is that du works on files and directories, you cant do it on only dirs. How can i overcome that?