gunzip Multiple Files in Different Subdirectories

Recently I had to unzip a lot of files located in subdirectories. To do this, I used a combination of the “find” and “gunzip” commands in Ubuntu:

find * -maxdepth 1  -name '*.gz' -exec gunzip {} \;

This finds all of the files with .gz extensions to a subdirectory depth of 1 maximum and then executes the gunzip command on the file.


About Bogdan Varlamov

A .NET Software Engineer that strongly believes technology should simplify and improve the quality of our lives instead of making them more complicated. View all posts by Bogdan Varlamov

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: