您的位置:首页 > 运维架构 > Linux

window ftp上传zip文件,linux不能用unzip解压问题

2015-03-09 16:28 447 查看
http://blog.itpub.net/22608279/viewspace-660343/

file *.zip
在windows cmd命令下ftp ,put文件 到远程服务器上
ftp> put "F:\oracle 10.2 for linux edition(32bit)\10201_database_linux32.zip"
200 PORT command successful.
150 Opening ASCII mode data connection for 10201_database_linux32.zip.
226-WARNING! 2502357 bare linefeeds received in ASCII mode
File may not have transferred correctly.
226 Transfer complete.
ftp: 668734007 bytes sent in 52.52Seconds 12733.91Kbytes/sec.
传送成功。
在linux中解压文件如下

[oracle@localhost oracle]$ ls
10201_database_linux32.zip database product test.log
[oracle@localhost oracle]$ unzip 10201_database_linux32.zip
Archive: 10201_database_linux32.zip
warning [10201_database_linux32.zip]: -20730 extra bytes at beginning or within zipfile
(attempting to process anyway)
error [10201_database_linux32.zip]: start of central directory not found;
zipfile corrupt.
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
用file 检查文件

[oracle@localhost oracle]$ file 10201_database_linux32.zip

10201_database_linux32.zip: Zip archive data, at least v1.0 to extract

解决方法:

在问题中出现appropriate BINARY mode 原来是上传文件时没用这种模式上传,在windows 下命令如下

ftp> bin
200 Type set to I.
这样上传文件以二进制模式上传之后就成功解决不能unzip问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: