linux ftp 自动上传文件脚本
应用场景:在机器A上需要定时上ftp服务器上传一些图片
脚本内容:
cd /usr/product/ftptemp/radartemp
FTP_FILE_GET=uplode_pred
echo "open 10.0.122.155" > $FTP_FILE_GET
echo "user upload uploadok" >> $FTP_FILE_GET
echo "prompt" >> $FTP_FILE_GET
echo "cd RadarModify" >> $FTP_FILE_GET
echo "mput *.gif" >> $FTP_FILE_GET
echo "bye" >> $FTP_FILE_GET
ftp -nv < $FTP_FILE_GET
rm -f *.gif