2011-05-16 52 views

回答

2

找到了解決方案: 我們可以使用lftp實用程序,然後從ruby調用它。

lftp -f file_with_command 

其中 'file_with_command' 文件中,我們規定:

lftp -u %s,%s %s 
get '%s' 
exit 

其中%s將用戶名,密碼,主機名,文件替換獲得相應。