#! /bin/bash
#
# Scripts for delete expire loggs
# www.jb200.com
currDate=`date -d today +"%F %r"`
baseLogPath=/home/Gzh/shell/
weblogPath=/usr/local/OA/jboss-cw-oa/logs/
find "${weblogPath}" -mtime +2 -type f -name "catalina.out.*" >> ${baseLogPath}del_expire.log
find "${weblogPath}" -mtime +2 -type f -name "catalina.*.log" |
xargs rm -rf
find "${weblogPath}" -mtime +2 -type f -name "catalina.out.*" | xargs rm -rf
echo "delete expire log successfully at ${currDate}" >> ${baseLogPath}del_expire.log