ftp使用二进制上传文件

在windows上服务器安装ftp模块,可供平时ftp用。在往一台redhat7.4服务器上传一个jdk包时,解压时报错。查询资料是因为上传文件是使用了ACSII格式去传输文件,导致文件损坏。(可以通过MD5的值去判断两个文件是否为同一文件,文件是否有损坏。)下面是操作步骤和相关报错。
[test@localhost bea]$ ftp 10.10.10.11
Connected to 10.10.10.11 (10.10.10.11).
220 Microsoft FTP Service
Name (10.10.10.11:test): zhongjianjian
331 Password required for zhongjianjian.
Password:
230 User logged in.
Remote system type is Windows_NT.
ftp> get jdk-6u201-linux-x64.bin
local: jdk-6u201-linux-x64.bin remote: jdk-6u201-linux-x64.bin
227 Entering Passive Mode (10,10,10,11,236,128).
125 Data connection already open; Transfer starting.
WARNING! 219752 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Transfer complete.
58712696 bytes received in 1.34 secs (43676.04 Kbytes/sec)
ftp> by
221 Goodbye.
[test@localhost165 bea]$ ll
total 311548
-rwxr-xr-x  1 root   root   201466748 Apr 24 17:44 20190424001.zip
-rw-r--r--  1 test test  58705516 Aug 29 10:50 install.sfx.32558
-rw-rw-r--  1 test test    122069 Feb 28 11:22 javax.persistence_1.0.0.0_2-0-0.jar
drwxr-xr-x  7 test test      4096 Jun 24  2018 jdk1.6.0_201
drwxr-xr-x  8 test test      4096 Mar 27  2013 jdk1.6.0_45
-rw-rw-r--  1 test test  58709743 Aug 29 10:56 jdk-6u201-linux-x64.bin
drwxrwxr-x 11 test test      4096 Nov 22  2018 wls1036
[test@localhost bea]$ chmod 740 jdk-6u201-linux-x64.bin
[test@localhost bea]$ ./jdk-6u201-linux-x64.bin
Unpacking...
Checksumming...
The download file appears to be corrupted.  Please refer
to the Troubleshooting section of the Installation
Instructions on the download page for more information.
Please do not attempt to install this archive file.

================================================
解决方法:
[test@localhost bea]$ ftp 10.10.10.11
Connected to 10.10.10.11 (10.10.10.11).
220 Microsoft FTP Service
Name (10.10.10.11:test): zhongjianjian
331 Password required for zhongjianjian.
Password:
230 User logged in.
Remote system type is Windows_NT.
ftp> binary
200 Type set to I.
ftp> get jdk-6u201-linux-x64.bin
local: jdk-6u201-linux-x64.bin remote: jdk-6u201-linux-x64.bin
227 Entering Passive Mode (10,150,129,103,238,252).
125 Data connection already open; Transfer starting.
226 Transfer complete.
58712696 bytes received in 0.886 secs (66232.92 Kbytes/sec)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值