我一直在BASH脚本中尝试简单的FTP命令将文件放到FTP服务器上。
USERNAME="User_name_here";
PASSWORD="pass_word_here";
SERVER="ftp_url";
cd /tmp
zip -r dash.zip dash
FILE="/tmp"
echo "file zipped";
BACKUPDIR="copy_dir"
# login to remote server
ftp -n -v $SERVER <<EOF
ascii
user $USERNAME $PASSWORD
cd $BACKUPDIR
mput $FILE/dash.zip
quit
EOF
echo "done";
执行后我收到错误 550 FileName无效 请建议..