赞
踩
#vim 111.sh
#!/bin/bash
zip_dir=/ievsp/develop/app20file/WebContent/file-server/zip
zipbak_dir=/home/backup
bak_file=zip_`date +%Y%m%d`
# tar everyday start
tar czvPf $zipbak_dir/$bak_file.tar.gz $zip_dir/echargenet.txt $zip_dir/echargenet.zip
# clear bak_file
find $zipbak_dir -mtime +7 -exec rm -rf {} \;
#end
#chmod a+x 111.sh
#crontab -e
18 18 * * * /home/backup/111.sh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。