圧縮された10 MBの部分に転送する必要がある3.5 GBのCSVファイルがあります。しかし、zip圧縮後に分割する過程を終えた後、 、 を利用してzip -s-
zipを再組み立てするとzip -s 0
動作しませんzip -FF
。
$ du -h mycsv.csv
3.1G mycsv.csv
まず、最大圧縮率でzipファイルを作成します。
$ zip -9 maximum.zip mycsv.csv
adding: mycsv.csv (deflated 92%)
$ du -h maximum.zip
254M maximum.zip
次に、次のコマンドを使用して、zip -s 10m
zipを複数の10mb zip部分に分割します。
zip -s 10m maximum.zip --out maxsplit.zip
copying: mycsv.csv
次に、zip -s-
次のコマンドを使用してファイルをzipに再組み立てしました。
$ zip -s- maxsplit.zip --out maxunsplit.zip
copying: mycsv.csv
しかし、ファイルは予想サイズに比べて非常に小さいです!
$ du -h maxunsplit.zip
21M maxunsplit.zip
代替コマンドを使用してzip -s 0
も失敗します。
$ zip -s 0 maxsplit.zip --out maxunsplit0.zip
copying: mycsv.csv
$ du -h maxunsplit0.zip
21M maxunsplit0.zip
別の代替コマンドzip -FF
も失敗しました。
$ zip -FF maxsplit.zip --out maxunsplitFF.zip
Fix archive (-FF) - salvage what can
Found end record (EOCDR) - says expect 26 splits
Scanning for entries...
Found spanning marker - expected as this is split (multi-disk) archive...
copying: mycsv.csv (265820618 bytes)
zip warning: entry truncated: mycsv.csv
zip warning: expected compressed/stored size 265820618, actual 20971443
zip warning: unexpected signature 50 4b 0d 0d on disk 2 at 2711323
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0b 08 on disk 2 at 8427139
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 08 03 on disk 3 at 4921506
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0c 06 on disk 6 at 2338084
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 04 02 on disk 6 at 3998893
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0c 01 on disk 6 at 6941468
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0d 01 on disk 11 at 6509060
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 01 0b on disk 13 at 6769524
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 03 09 on disk 16 at 3164347
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0e 02 on disk 16 at 5817195
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 03 06 on disk 16 at 7044780
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0d 07 on disk 17 at 9182115
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 05 03 on disk 19 at 3063961
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 00 02 on disk 19 at 10170897
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0b 01 on disk 20 at 1420190
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 02 05 on disk 22 at 1010931
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 07 05 on disk 22 at 1918087
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 07 0b on disk 23 at 1507450
zip warning: skipping this signature...
zip warning: unexpected signature 50 4b 0a 0a on disk 23 at 10456363
zip warning: skipping this signature...
Central Directory found...
no local entry: mycsv.csv
EOCDR found (26 3676780)...
zip warning: zip file empty
最後にいくつかのエラーメッセージがありますが、その意味はわかりません! ?
ZipとLinuxのバージョン:
$ zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
$ uname -rosv
Linux 5.4.0-56-generic #62~18.04.1-Ubuntu GNU/Linux