ZIPファイルで使用されているのと同じCRCを計算できるCLIユーティリティはありますか?

ZIPファイルで使用されているのと同じCRCを計算できるCLIユーティリティはありますか?
# Create random file    
$ dd if=/dev/urandom /of=./test.dat bs=1K count=1

# Zip it 
$ zip test.zip test.dat

# Dump contents for ZIP-computed CRC
$ unzip -v test.zip
Archive:  test.zip
Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    1024  Stored     1024   0% 2018-12-09 17:42 1f197320  test.dat
--------          -------  ---                            -------
    1024             1024   0%                            1 file

# compute CRC with coreutil's cksum
$ cksum test.dat
283837118 1024 test.dat

# convert to hex
$ printf "%08x" 283837118
10eb02be

重要な要約:cksumZIPと同じCRCアルゴリズムを使用しません。

ベストアンサー1

crc32はい、Perlモジュールで提供されているコマンドを使用できますArchive::Zip。 Debian およびその派生製品では、以下をインストールしてください。libarchive-zip-perlそれを得るために、それを達成するために。

おすすめ記事