I have the following directory structure:
A0
├── A1
│ ├── A1_B1
│ │ ├── A1_B1_1.docx
│ │ ├── A1_B2_2.pptx
│ ├── A1_B2
│ │ └── A1_B2_C1
│ │ ├── A1_B2_C1_D1
│ │ │ ├── A1_B2_C1_D1_1.docx
│ │ │ └── A1_B2_C1_D1_2.docx
│ │ └── A1_B2_C1.xlsx
├── A2
└── A0.txt
I want to create a .7z file that will contain only the files. I don't want to keep the folders. I have tried this answer and this answer but they don't work in Linux.
Is it possible to do it with 7z
or I should extract files to a single directory first and then compress.