使用FTP put命令在主机服务器中复制文件 [英] File not copied in host server using FTP put command
问题描述
当我尝试创建并将一个/tmp/filename.txt发送到目标服务器时。我无法处理该文件并且它在目标服务器中不可用(它没有被复制)但是文件已在/ tmp目录中创建并且数据已被复制。
注意:文件没有移动到目标服务器目录。我正在使用.sh脚本运行。
HOST =ftp.server.com
USER =用户名
PASSWD =密码
FILE =/ tmp / test.sh
echo复制到测试文件> $ FILE
ftp -n $ HOST<< EOF
USER $ USER $ PASSWD
ascii
cd targetDir
put $ FILE
退出
EOF
When I am trying create and send one /tmp/filename.txt to target server. I am not able process the file and It is not available in target server(It was not copied) but file has created in /tmp directory and data has copied.
Note: file is not moving to target server directory. and I am running by .sh script.
HOST="ftp.server.com"
USER="username"
PASSWD="password"
FILE="/tmp/test.sh"
echo"copied to test file">$FILE
ftp -n $HOST <<EOF
USER $USER $PASSWD
ascii
cd targetDir
put $FILE
quit
EOF
推荐答案
文件
ftp -n
FILE
ftp -n
HOST< ;< EOF
USER
HOST <<EOF
USER
USER
这篇关于使用FTP put命令在主机服务器中复制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!