admin 管理员组

文章数量: 887019

FTP


现象: WARNING! 137 bare linefeeds received in ASCII mode 


解决: 上传文件之前 先设置 文件类型为 binary



c:\>ftp 192.168.0.224
连接到 192.168.0.224。
220 192.168.0.224 FTP server (QNXNTO-ftpd 20081216) ready.
用户(192.168.0.224:(none)): anonymous    // 匿名方式
331 Guest login ok, type your name as password.
密码:   // 此处直接回车
230 Guest login ok, access restrictions apply.
ftp> ls  // 查看FTP根目录文件,对应/opt/ftp目录
200 PORT command successful.
150 Opening ASCII mode data connection for 'file list'.
a.c
226 Transfer complete.
ftp: 收到 5 字节,用时 0.00秒 5000.00千字节/秒。
ftp> binary  // 设置传输方式为binary
200 Type set to I.
ftp> put gf_splash  // 上传文件
200 PORT command successful.
150 Opening BINARY mode data connection for 'gf_splash'.
226 Transfer complete.
ftp: 发送 25204 字节,用时 0.02秒 1200.19千字节/秒。
ftp> ls  // 确认上传成功
200 PORT command successful.
150 Opening ASCII mode data connection for 'file list'.
gf_splash
a.c
226 Transfer complete.
ftp: 收到 16 字节,用时 0.00秒 16000.00千字节/秒。
ftp> bye  // 断开FTP连接
221-Data traffic for this session was 25204 bytes in 1 file.Total traffic for this session was 26023 bytes in 3 transfers.
221 Thank you for using the FTP service on 192.168.0.224.c:\>


本文标签: ftp