current directory
├──Folder1
├── sub_folder1
├──Folder2
├── sub_folder21
├── sub_folder22
├── sub_folder221
├──Folder3
├── sub_folder31
├──Folder4
├── sub_folder41
├──Folder5
├── sub_folder51
Given the above folder subfolder hierarchy, which was compressed into one tgz file, I need to extract all files present in any folders subfolders, into one and only output directory.
Actually all files exist in the deepest path of each folder subfolder combination. for example in sub_folder1,sub_folder2, sub_folder221, etc.
I have tried with the following:
find . -name '*.tar.gz' -execdir tar -xzvf '{}' \;
...but that outputs the exact hierarchy of files and subfolders, when I need all files in all subfolders, to be extracted to just one output folder /path/to/one/folder