1

I would like to automatically delete old files from my production apps in order to clear up space on my organization's shared network filesystem. I imagine a good way to do this would be to create a configuration file where I list some globs or regexes with a retention period like

foo/* 30d
bar/baz/* 60d
bar/baz/big_file_* 1d

The tool would then let me automatically delete files with a modify time (mtime) older than the given retention period. Ideally it would also tell me files that did not match any glob, and globs that did not match any files, so that I can be sure that my retention policy exactly matches the files I have.

Is there an open-source tool that runs on Linux that does this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.