对方机器有ftp服务
在/home/jephe下创建一个script,详细写上一条条ftp命令如test象下面这样:
$ more test
open shopu
user jephe yourpasswd
binary
cd /home/ftp/pub/tools/3c509b
get 3c5x9cfg.exe
bye
然后,用
$ ftp -vin < test
Connected to shopu.yourdomain.com.
230 User jephe logged in.
200 Type set to I.
250 CWD command successful.
local: 3c5x9cfg.exe remote: 3c5x9cfg.exe
200 PORT command successful.
150 Opening BINARY mode data connection for 3c5x9cfg.exe (233851 bytes).
226 Transfer complete.
233851 bytes received in 0.0225 secs (1e+04 Kbytes/sec)
221-You have transferred 233851 bytes in 1 files.
221-Total traffic for this session was 234585 bytes in 1 transfers.
221-Thank you for using the FTP service on shopu.yourdomain.com
221 Goodbye.
注: -v ----- 显示chat过程
-i ----- 关闭交互模式
-n ----- 关闭自动登录过程
[ Last edited by weasel on 2008-11-12 at 23:35 ]