Otomatik olarak web sunucusu dosyaları silmek

0 Cevap php


I need to delete files from a directory in my web-server and I need some script to do it automatic. And there is few more conditions which need to be fulfilled.

  • It has to clean the directory then total file size exceeds some certain limit for example 1,5GB
  • That files would be deleted every 24 hours.
  • New files like 10 ir 20 mins old would not be deleted
  • It would be just awesome if all of the conditions above would be work at the same time.

For deleting files I was thinking of some kind of corn task but I do not know a thing about them so it is tricky for me.
To delete files then a certain limit is reached I was thinking that some kind of PHP script my help. May be there is a library meant for these things.
Any way I will be very happy for any kind of help. May be I just need some fresh thoughts to come up with a right keyword for google ;P

EDIT: Benim sunucu linux üzerinde çalışır.

0 Cevap