最后做法
#!/bin/sh
#scripts for catalina date

/bin/cat /var/tomcat/logs/catalina.out > /var/tomcat/logs/catalina.out.`date +%Y%m%d`
/bin/cat /dev/null > /var/tomcat/logs/catalina.out


echo "daily cut_catalina.out successful at "`date` >> /catalina_log.txt