Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't Delete Files Younger Than a Certain Age #4

Open
proedie opened this issue Sep 3, 2014 · 1 comment
Open

Don't Delete Files Younger Than a Certain Age #4

proedie opened this issue Sep 3, 2014 · 1 comment
Labels

Comments

@proedie
Copy link

proedie commented Sep 3, 2014

Hello!

When the hard-disk runs out of space completely, --min-free would empty the trash completely – including files the user deleted just half an hour ago.

However, when the drive runs full, there probably is something wrong and the deletion of very young files in the trash could turn out as unnecessary after the problem is fixed. So, in my opinion, it would be nice to add an option to safe files from deletion until they reach a certain age. For example:

autotrash --min-free 2048 --min-days 7

would delete all files until either 2048 MB are free or only files deleted within the last seven days are left.

What do you think?

@bneijt
Copy link
Owner

bneijt commented Sep 6, 2014

I have never had this problem myself and I often notice the HD limit problem before cron gets to running autotrash.

But there is no reason not to add this feature. Have you tried patching the code yourself? I'd be happy to review a pull request.

@bneijt bneijt added the feature label May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants