[Petal] Petal temp files

Fergal Daly fergal at dyn.fergaldaly.com
Tue Feb 15 20:31:13 GMT 2005


It might be worth looking again at using one of the standard CPAN caching
modules in Petal. Cache::Cache can handle storage limits automatically. I
believe the argument against it was that it introduced external dependencies
but with cpan doing all the work, I don't see a problem with that.

For future reference

ls /tmp/petal_* | xargs rm

will call rm with as many arguments as possible, as many times as
necessary to work through the output of the ls. man xargs for more
goodness,

Fergal

 
On Tue, Feb 15, 2005 at 03:30:07PM +0000, Chris Croome wrote:
> Hi
> 
> I wonder if the tmp file generated by Petal could be done in a better
> way perhaps?
> 
> I'm in process of deleting 420095 /tmp/petal_* off a server and it's not
> so easy to do when you have more files than you shell can cope with (I
> had to find the files, write the results to a file and trun that into a
> deletion script).
> 
> What do other people do, have cron jobs that delete the old ones once a
> week or something?
> 
> Chris
> 
> -- 
> Chris Croome                               <chris at webarchitects.co.uk>
> web design                             http://www.webarchitects.co.uk/ 
> web content management                               http://mkdoc.com/   


More information about the Petal mailing list