. ~/.bash_profile
TODAY_DIR=`date +%Y%m%d`;
HOST='FLOW-01'
cd /usr/local/apache-tomcat-7.0.55_8081/logs
if [ -f "$HOST.catalina.out.${TODAY_DIR}.tar.gz" ]
then
echo "file exits"
else
tar -czvf $HOST.catalina.out.${TODAY_DIR}.tar.gz catalina.out
>catalina.out
###FTP传输
ftp -n<<!
open 5.36.10.2 1029
user scan xxxx
pass
bin
put $HOST.catalina.out.${TODAY_DIR}.tar.gz
exit
!
fi