But currently my / is full:
Code: Select all
guest@porteus:~/.cache$ df -Tm /
Filesystem Type 1M-blocks Used Available Use% Mounted on
aufs aufs 388 388 0 100% /
Code: Select all
guest@porteus:~/.cache$ du -m thumbnails/
1 thumbnails/fail/gnome-thumbnail-factory
1 thumbnails/fail
91 thumbnails/large
148 thumbnails/normal
239 thumbnails/
Therefore my question: is there a background way that not uses much system resources that will delete older thumbnails?
E.g. run it once an hour to keep the thumbnails/ folder in between a given size limit (e.g. not larger than 100 MB) by removing the oldest thumbnails.
The cron entry itself is not that much of a challenge.
All files and folders thumbnails/fail should be deleted regardless of age.
Then the thumbnails/large should be deleted, then the oldest from thumbnails/normal until the used space is once more below the threshold (e.g. 100MB)
I do not want to code that.
But I am sure somewhere in the vast space of the Linuxverse there already exists the solution for doing just that.