I have a directory. It has about 500K .gz files.
How can I extract all .gz in that directory and delete the .gz files?
how can I extract multiple gzip files in directory and subdirectories? It will extract all files with their original names and store them in the current user home directory( /home/username ). gunzip *. gz // This command also will work.
To open (unzip) a . gz file, right-click on the file you want to decompress and select “Extract”. Windows users need to install additional software such as 7zip to open .
This should do it:
gunzip *.gz
@techedemic is correct but is missing '.' to mention the current directory, and this command go throught all subdirectories.
find . -name '*.gz' -exec gunzip '{}' \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With