logrotate files older than x hours

خرید بک لینک

What's wrong with this rotate.conf?

Goal is to delete only files older than four hours

path/to/tokens/*.tkn {
    nosharedscripts
    prerotate
       if test `stat --format=%Y $1` -le $(( `date +%s` - 14400 ));
       then exit $?;
       fi;'
    endscript
    rotate 0
}

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 237 تاريخ: يکشنبه 3 مرداد 1395 ساعت: 6:53

صفحه بندی