i have phenological data of different tree species, but they are saved by the bigger Treegroup.
The output of find . -name *.tar.gzis:
./Tilia/PEP725_DE_129_070.tar.gz
./Tilia/PEP725_DE_129_071.tar.gz
./Fagus/PEP725_DE_108_010.tar.gz
./Acer/PEP725_DE_115_000.tar.gz
./Acer/PEP725_DE_115_030.tar.gz
./Betula/PEP725_DE_106_020.tar.gz
I want to extract every file in their subdirectory and the name of the output directory should be the same as the tar-file.
I manage to extract all with find . -name *.tar.gz -execdir tar -xvzf "{}" \; But this does not create a directory name after the zipped files.
How do i do this? -C needs the directory already to be existend...
So in the end i would like to have
Tilia/EP725_DE_129_070/content_of_PEP725_DE_129_070.tar.gz
and so on...