无法卷曲然后解压缩zip文件

时间:2015-05-04 16:21:34

标签: bash unzip

我只想尝试卷曲这个zip文件,然后将其解压缩

curl -sS https://www.kaggle.com/c/word2vec-nlp-tutorial/download/labeledTrainData.tsv.zip > labeledTrainData.tsv.zip
unzip labeledTrainData.tsv.zip labeledTrainData.tsv

但我一直得到错误;

Archive:  labeledTrainData.tsv.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.

我认为我使用的是与此response相同的语法。我正在下载的文件有问题吗?我觉得我正在做一个菜鸟的错误。我在shell脚本中运行这两个命令

1 个答案:

答案 0 :(得分:1)

我能够复制你的错误。这种错误通常表示两件事之一:

  1. 文件未正确打包
  2. 您没有下载您认为正在下载的内容。
  3. 在这种情况下,你的问题是后者。看起来您正在从错误的URL下载文件。当我打开所谓的zip文件阅读时,我看到了这一点:

    <html><head><title>Object moved</title></head><body>
    <h2>Object moved to <a href="/account/login?ReturnUrl=%2fc%2fword2vec-nlp-tutorial%2fdownload%2flabeledTrainData.tsv.zip">here</a>.</h2>
    </body></html>
    

    简而言之,您需要从上面指定的备用URL下载。此外,Kaggle在下载时通常需要登录凭据,因此您还需要指定用户名/密码。

相关问题