8
rated 0 times
[
8]
[
0]
/ answers: 1 / hits: 739
/ 2 Years ago, mon, may 30, 2022, 9:30:35
I have tried to extract multiple files from the directory where they're located with:
for i in $(find . -name '*.tgz'); do # search the tgz files and extract them
tar -xvzf $i
done
I expected that the command would extract these files within the directory they were found in, however they are extracted outside their directory. How can I make sure that the .tgz files are extracted in the directory where they are located?
More From » bash