1

Having looked at a few answer, for instance this one: Unzip specific directory without creating top directory

It's not what I'm looking for.

The situation is a zip with the following directories:

/a/b/c/d/e1/... /a/b/c/d/e2/...

So under d, you have e1 and e2.

What I want to achieve is extracting only those 2, without replicating the entire directory structure, but also without using -j, which ignores all paths.

I want the directory structure to exist from d/ onward.

To be as clear as possible, the extracted folder should look like:

d
| - e1
|   |
|   | - fileA
|   | - fileB
| - e2
|   |
|   | - fileC
|   | - fileD

How do I do that?

KdgDev
  • 235
  • 1
  • 3
  • 14
  • 1
    Same question on superuser with good answers: https://superuser.com/questions/518347/equivalent-to-tars-strip-components-1-in-unzip – pLumo Oct 22 '19 at 13:32

0 Answers0