Untar/Unzip Multiple Files in One Command

Hola!

Ungzipping all files in one line:

# For *.gz
find -name '*.gz' -exec tar xzv '{}' ';'

# For *.tar.gz
find -name '*.tar.gz' -exec tar xzvf '{}' ';'

It uses all the files that find outputs and sends them to tar. The same can be applied to any other archive format, just change the respective parameters.

Stay in the loop

New posts on science, AI, bioinformatics and life. No spam, unsubscribe anytime.

Powered by Buttondown