Search code examples
fedora

How to extract all compressed Z files in a directory?


I am on Fedora 35 and I have a directory full of .Z I have to extract within the directory. Here is an example of how they are named:

GIRAF.2021-02-14T00:59:35.569.fits.Z

I was wondering if there was a command I could type in the terminal that extracts all .Z files in the directory?


Solution

  • The solution is given by rickhg12hs.

    First, try gunzip -vt *.Z to see if there are any problems.

    If none, then gunzip *.Z