有問題。我需要使用linux bash將文件上傳到遠程ftp服務器。 不適合這樣:cp file.tar.gz ftp://username:[email protected]/file.tar.gz
可以這樣做嗎?將文件上傳到遠程服務器
在此先感謝,亞歷克斯
有問題。我需要使用linux bash將文件上傳到遠程ftp服務器。 不適合這樣:cp file.tar.gz ftp://username:[email protected]/file.tar.gz
可以這樣做嗎?將文件上傳到遠程服務器
在此先感謝,亞歷克斯
我會用http://www.ncftp.com/這一點。
// see comment => 「具體來說,看看ncftpput。」
你可以使用普通的ftp + bash來做這個。
bash腳本開始:
echo「put $ 1」> commands.txt;
echo「quit」>> commands.txt;
FTP用戶@ FTP://用戶名:密碼@主機< commands.txt中
bash腳本結束。
把它放在ftp.sh中。運行它像./ftp.sh file.tar.gz.這將上傳到FTP服務器。
具體來說,看看[ncftpput](http://www.ncftpd.com/ncftp/doc/ncftpput.html)。 – 2011-02-02 22:11:08