1

Everybody have the same problem: how to deal with old files, logs, temporal files to archive them (compress, store in alternate locations), delete unneeded, etc. them

Specially if you have to deal with a lot of home-brew and third-party software and tools, that basically fill the disk do not care about their logs/temp files.

Now I am using my own shell scripts using find, logrotate, tar, etc. But everything is too ad-hoc for my taste, and not efficient at all.

I would love some kind of generic tool, based on patterns and rules/actions that will allow define actions on the files based on their name, age, etc.

I want to write it, but I am sure that somewhere wrote something: Do you know any?

4
  • 1
    Are you saying that logrotate doesn't use globbing, file modification times?
    – symcbean
    Sep 30, 2011 at 15:51
  • Do you use logrotate for everything? Clean temporal and old files too?
    – Keymon
    Oct 3, 2011 at 10:02
  • Yes, you can use them for those functions.
    – symcbean
    Oct 4, 2011 at 13:51
  • temporal files to archive is a contradictio in adjecto. Feb 1, 2012 at 0:03

3 Answers 3

2

I think tmpwatch or tmpreaper might do what you need. Both are already in the respective distros.

# CentOS
yum install tmpwatch

# Debian/Ubuntu
aptitidue install tmpreaper
0

Actually I found a perl library that does this: http://search.cpan.org/~dhorne/File-Maintenance-0.03/lib/File/Maintenance.pm

0

I'm not exactly understanding, what type of tool you need. Logrotate + rsyslog really handles all my logging control needs. I have used a couple other tools for cleaning up file cruft. Possibly check out fslint and BleachBit.

To really wrap everything up, all in one, you almost are forced to configure something. Your systems are customized for you, so cleaning them is also customized for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.