Request some help please

Kim Petersen kp at kyborg.dk
Sat Aug 24 17:19:15 EDT 2002


chen lee wrote:
> I need to be able to watch a linux directory and remove all file that
> are over 4 housr old .  Is this possoble with python or should I just
> use perl to do it?

Don't be silly ;-)

Things to look at: os.listdir() and os.stat()
depending on how often you want to check, you might invoke your program as
a cronjob - or simply build in a delay (possibly using time.sleep() or
select.select([],[],[],delaytime))

> 
> C Lee
> 



-- 
Med Venlig Hilsen / Regards

Kim Petersen - Kyborg A/S
IT - Innovationshuset
Havnepladsen 2
7100 Vejle
Tlf. +4576408183 || Fax. +4576408188




More information about the Python-list mailing list