Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 adhoc 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 wanna write it, but I am sure that somewhere wrote something: Do you know any?

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

3 Answers 3

up vote 2 down vote accepted

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
share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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