ファイルを解凍すると、以下のエラーが発生します。
unzip user_file_batch1.csv.zip
Archive: user_file_batch1.csv
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 user_file_batch1.csv or
user_file_batch1.csv.zip, and cannot find user_file_batch1.csv.ZIP, period.
アーカイブユーティリティを使用して解凍できたため、ファイルが破損していないか、複数のアーカイブファイルの一部だと思います。私は名前を変更しようとしましたが、.zip
成功しませんでした。
の出力はtype file user_file_batch1.csv.zip
次のとおりです。
user_file_batch1.csv.zip: uuencoded or xxencoded text
ベストアンサー1
ファイルに.zip
名前がありますが、zip形式ではありません。ファイル名を変更しても内容は変更されず、特に魔法のように他の形式に変換されません。
(または不完全なzipファイルが原因で同じエラーが発生する可能性がありますが、アーカイブユーティリティが機能するため、そうではありません。)
file user_file_batch1.csv.zip
このファイルがどのような種類であるかを確認するには、実行してください。これは、Archive Utilityが理解している別の種類のアーカイブです。
user_file_batch1.csv.zip: uuencoded または xxencoded テキスト
次のコマンドを実行します。
uudecode user_file_batch1.csv.zip
これにより、に表示される名前のファイルが作成されますuser_file_batch1.csv.zip
。別の出力ファイル名を選択するには、次のようにします。
uudecode -o user_file_batch1.csv.decoded user_file_batch1.csv.zip
このステップの出力ファイル自体がアーカイブである可能性があります。 (本当のzipファイルかもしれません。)file
このファイルに対してユーティリティを再実行して、ファイルが何であるかを確認してください。自動ファイル名を選択すると手がかりを提供できます。