Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I extract a *.7z file on Ubuntu while keeping the directory structure intact?

Following this guide, I tried

7za e My.7z file.

But it does not keep the files in the SAME directory structure whith all the files at the parent directory.

Thank you.

share|improve this question
Please include an example showing what you would like to get and what is actually happening. Also, you have probably created the archive badly, make sure you compress the parent folder and not its contents, ie run 7za -a foo.7z /foo and NOT 7za foo.7z -a /foo/*. – terdon Dec 19 '12 at 20:48
up vote 4 down vote accepted

Maybe this can help you:

7z x Myfile.7z
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.