I am talking about the .Trash-1000
folders like.
Some times it's contents size reach like 18GB, and applications trying to write files will fail with no clear messages, because the disk space has ended.
I am looking for a way to force a trash quota/limit with some extra constraints.
These constraints options would be good:
- by file date/time, older files are erased first.
- by available disk space, if it has like less than 1GB, no matter what trash file datetime it is, it gets erased to keep 1GB available.
- by file size, if trashed file is bigger than 500MB, it is promptly erased.
Is there such software sitting somewhere so I can avoid scripting it up?
Try autotrash from the repositories.
Once installed, you'll need to add a cron job to run autotrash.
Run
crontab -e
, and add the following line:I don't think it covers the last point, but it's something to start with.
PS: Also check out
man autotrash
for more info.