OS windows linux
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问题
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22608279/viewspace-660343/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22608279/viewspace-660343/