我在网上找到了这个脚本:
#!/bin/bash
HOST='your.ftp.site'
USER='remoteusername'
PASSWD='remotepasswd'
ftp -n -v $HOST << EOT
ascii
user $USER $PASSWD
prompt
//Stuff here
bye
EOT
如何在//stuff here
中选择文件/serverfiles.zip
并将其放在外部FTP服务器上?
我试过谷歌,虽然我觉得这应该很容易但我找不到任何东西。
我正在使用debian 7 x64
答案 0 :(得分:1)
mput /serverfiles.zip
应该有效。 从 ftp 手册页:
mput local-files
Expand wild cards in the list of local files given as argu-
ments and do a put for each file in the resulting list. See
glob for details of filename expansion. Resulting file names
will then be processed according to ntrans and nmap settings.