哲妍6519 发表于 2016-6-7 12:04:40

【Shell脚本】ftp上传文件

  将本地目录/usr/local/shells/ftp下的文件index.jsp通过ftp上传到10.0.0.13的目录/opt/naridtfiles下。
  
  uploadfile.sh

#!/bin/bash
# upload loacal file(/usr/local/shells/ftp/index.jsp) to server by ftp
ftp -n <<!
open 10.0.0.13
user root techstar
binary
hash
cd /opt/naridtfiles
lcd /usr/local/shells/ftp
prompt
mput index.jsp index.jsp
close
bye
!
  
页: [1]
查看完整版本: 【Shell脚本】ftp上传文件