0

I've create a zip archive using the following command:

zip -e myfolder.zip myfolder/

Which prompts for a password and compresses the folder without errors. Now I'm trying to unzip the archive using this other command:

unzip myfolder.zip

which should supposedly ask for the password I set before, but doesn't - it just extracts an empty folder. I've tried using the -p mypassword option, but with the same results.

What could be the problem?

1 Answer 1

1

Since you did not use the -r option when creating the archive, your archive contains only the directory, and not the files inside it.

Apparently the encryption of a Zip file does not extend to protecting the directory structure, just the contents of the files. As a result, if a zip file contains only directories and no files, the encryption/decryption does nothing at all.

3
  • in other words I lost all my files for good? Commented Dec 29, 2020 at 11:48
  • Check the contents listing of your zip file: unzip -l myfolder.zip. If you have deleted the original folder, then it's lost because you never zipped its contents in the first place. Commented Dec 29, 2020 at 11:54
  • Today is the day that you learn to test your work. Commented Dec 29, 2020 at 12:29

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.