Posted By

noah on 02/08/10


Tagged

delete ruby remove files log clean FileSystem rake maintenance logging logfile Rakefile


Versions (?)

Howto set up a Rake task to clean out old temp files and logfiles


 / Published in: Ruby
 

URL: http://martinfowler.com/articles/rake.html#BuiltInCleaning

If you don't see a particular extension in the CLEAN list, test before you add it. Common temporary file extensions like ~ are cleaned by default.

  1. require 'rake/clean'
  2.  
  3. CLEAN.include "**/*\#", "**/*\.aux", "**/*\.rid"
  4.  
  5. CLOBBER.include "log/**/*.log", "log/**/*.yml", "log/**/*.html", "log/**/*.txt", "log/**/*.xml"

Report this snippet   <

You need to login to post a comment.