-2

For example,I created a simple zip file (inside I have the sentence: hello world!) in desktop. I want to unzip it, but nothing happens. I also installed (zip unzip) with this command: sudo apt install zip unzip, but it says that I have already have the newest versions of these installed.

Here is the error I get in the terminal:

Here is the error I get in the terminal

karel
  • 110,292
  • 102
  • 269
  • 299
Nick_Gkoutzas
  • 79
  • 1
  • 2
  • 5
  • "Can't extract file.zip" Care to show to us what's the error you see? – Liso Apr 18 '20 at 13:44
  • There was an error while extracting "file.zip" – Nick_Gkoutzas Apr 18 '20 at 13:48
  • 1
    Please don't post additional information as answers. This is not a forum. [edit] your question instead. – Pilot6 Apr 18 '20 at 14:10
  • There may be two reasons: 1) The archive is really corrupt; 2) File names may have non-ascii characters. The second can be fixed. Can you give a link to that file? – Pilot6 Apr 18 '20 at 14:11
  • Hey Nick, please use the [edit button](https://askubuntu.com/posts/1228239/edit) to append answers to your question as opposed to making multiple answers. Have a look at some other questions: https://askubuntu.com/questions/790929/does-ubuntu-come-with-a-zip-file-extracter?rq=1 / https://askubuntu.com/questions/520546/how-to-extract-a-zip-file-to-a-specific-folder?rq=1 and https://askubuntu.com/questions/482849/why-is-this-zip-file-unable-to-open?rq=1 – DankyNanky Apr 18 '20 at 14:57
  • Does this answer your question? [unzip error "End-of-central-directory signature not found"](https://askubuntu.com/questions/54904/unzip-error-end-of-central-directory-signature-not-found) – karel Apr 22 '20 at 07:49

2 Answers2

0

First, in the terminal use the cd command to change to the location you want. An example being cd /home/nick/Downloads. From here, verify that the file exists using ls -la | grep .zip to ensure you're in the right location.

From here, if you want to unzip to the current location, just run:

unzip file.zip
DankyNanky
  • 554
  • 2
  • 17
  • Hey @Nick_Gkoutzas, the error stipulates that the zip file has no content, or `Zip` cannot read the file. A return of `ls -la` might give you file size. If corrupted, I'd suggest a redownload of the file. – DankyNanky Apr 18 '20 at 13:59
  • I changed this zip file to tar file and I I will try to untar it .if that doesn't work ,I will redownload the file – Nick_Gkoutzas Apr 18 '20 at 14:09
  • Hey Nick, in your other post it states the file seems corrupt. Try again with the download, otherwise perhaps try to use [something like 7Zip](https://www.how2shout.com/how-to/install-7zip-ubuntu-linux-command-line.html) to see if this is a compression issue. – DankyNanky Apr 18 '20 at 14:17
0

A better question is "How did you create the zip file?" If you made it in an editor, it's not "really" a zip archive and unzip won't work. If you want the contents, use cat hello.zip. To properly create a zip file, you can use, zip filename.zip filename.

Michael
  • 65
  • 1
  • 7