我有一个由Ubuntu中的zip命令创建的zip文件,并由Ubuntu中包含的Archive Manager更新。
我试图使用PERL读取该存档的成员,如下所示:
use strict;
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $zip = Archive::Zip->new();
unless ( $zip->read( '/home/mohamad/Desktop/VM/vm.zip' ) == AZ_OK ) {
die 'read error';
}
my @files = $zip->memberNames();
print join("\n" , @files) ."\n";
此zip文件大约为12 GB,我知道此模块的压缩限制不超过4 GB,但我试图查看它是否至少可用于访问aa + 4GB存档的成员。
这是我得到的错误:
at /usr/share/perl5/Archive/Zip.pm line 477.
Archive::Zip::_readSignature('IO::File=GLOB(0xb75ae8)',
'/home/mohamad/Desktop/VM/vm.zip') called at
/usr/share/perl5/Archive/Zip/Archive.pm line 603
Archive::Zip::Archive::readFromFileHandle('Archive::Zip::Archive=HASH(0xb75c20)',
'IO::File=GLOB(0xb75ae8)', '/home/mohamad/Desktop/VM/vm.zip') called
at /usr/share/perl5/Archive/Zip/Archive.pm line 548
Archive::Zip::Archive::read('Archive::Zip::Archive=HASH(0xb75c20)',
'/home/mohamad/Desktop/VM/vm.zip') called at test.pm line 6 read error
at test.pm line 7.
我的问题是:
我真正需要的Archive :: Zip是能够在存档中重命名文件成员。
感谢您的帮助。