Click to See Complete Forum and Search --> : clean up util


iDxMan
10-29-2001, 11:20 PM
Its been awhile since I've lurked at LNO .. I'll have to look around a bit..

Anyways, I was in the middle of writing a small cleanup util in perl which basically reads an "ini-style" type config and purges files matching a regex. Each reg has a timeframe /etc. etc...

Something in the format of :


#-------------
[sect1]
path = /path/to/stuff
timeframe = DAY
filematch = ^DB\_\d{6}\.(dat|idx)$
filetime = 7

[sect2]
path = /path2
timeframe = WEEK
filematch = ^\X\.\d{6}
filetime = 1

etc..etc..



The part I haven't done is to check the owner of the file and ensure that any process by that user is newer than the file. Basically we have X applications that create various types of temp or working files.. I'd like a common app to purge these.. ie: Not having to think about script X on system 4 is different then the one on sys1/etc..

I just wanted to check if anyone knew of something already out there.. Not sure if this is topic.. close enough...

Thanks!

[ 29 October 2001: Message edited by: iDxMan ]