Extract and delete all .gz in a directory- Linux

user2247643 picture user2247643 · Apr 16, 2013 · Viewed 145.8k times · Source

I have a directory. It has about 500K .gz files.

How can I extract all .gz in that directory and delete the .gz files?

Answer

Adrian Dunn picture Adrian Dunn · Nov 20, 2013

This should do it:

gunzip *.gz