AIX unzip 解压遇到 End-of-central-directory signature not found. Either this file is not a zipfile

  • Post author:
  • Post category:其他




遇到的问题描述

操作系统为:AIX 7

准备安装Oracle补丁,在解压

unzip p34163709_112040_AIX64-5L.zip

时报错如下:

Archive:  p34163709_112040_AIX64-5L.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of p34163709_112040_AIX64-5L.zip or
        p34163709_112040_AIX64-5L.zip.zip, and cannot find p34163709_112040_AIX64-5L.zip.ZIP, period.



思路1 : 操作系统fsize需要为-1

检查AIX操作系统参数 fsize是否为-1 !!!

因为在AIX系统中,的确有单文件大小的限制,默认是1G。

查看限制可以登录aix系统输入命令

ulimit -a

进行查看

# ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited       ---- 此显示为无限制,若不是,需修改
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user)  unlimited

修改限制需要root用户登录,编辑

/etc/security/limits

文件,找到你ftp的那个用户(若没有可以新写一行),按照“default:”的格式在用户下加上一行:

fsize = -1



思路2:上传时文件损坏

如果使用CRT链接服务器的话,右键session窗口,选择

Connect SFTP Session

, 在SFTP终端内键入

binary

使用二级制方式传输文件。这样可以减少文件格式在不同类型服务器中传输的转换问题。

在这里插入图片描述

sftp> binary
Using binary mode to transfer files.



思路3:文件大小超过2GB需要…

AIX 超过2GB的文件在解压时,需要使用jar命令了。

$ ls -lt p3*

-rw-r–r– 1 root system 2154516875 Oct 22 23:30 p34163709_112040_AIX64-5L.zip

怀着试试看的心情使用jar命令,终于!! 成功解压了

jar -xvf  p34163709_112040_AIX64-5L.zip

虽然是个小问题,但是排查的过程中发现,原来还有这么多因素都会导致AIX解压不成功。有学习到了~!



版权声明:本文为strawberry1019原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。