I'd like to know what is the command to use to gunzip all files in a target directory recursively? I tried to use the unzip command but it didn't work.
I tried the command from Unzip all zip files in a target folder?
Using the commands below. Replace <path_of_your_zips>
with the path to your ZIP files and <out>
with your destination folder:
For GZ files
find <path_of_your_zips> -type f -name "*.gz" -exec tar xf {} -C <out> \;
or
find <path_of_your_zips> -type f -name "*.gz" -print0 | xargs -0 -I{} tar xf {} -C <out>
For ZIP files
find <path_of_your_zips> -type f -name "*.zip" -exec unzip {} -d <out> \;
or
find <path_of_your_zips> -type f -name "*.zip" -print0 | xargs -0 -I{} unzip {} -d <out>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments