Home > database >  How to unzip .gzip files
How to unzip .gzip files

Time:04-12

I have a bunch of files that end in .csv.gzip (ex: salesdataFeb23.csv.gzip). I want to unzip them in my mac terminal, so I've tried doing the following:

gunzip salesdataFeb23.csv.gzip

But I get an error that says

gunzip: salesdataFeb23.csv.gzip: unknown suffix -- ignored

How do I troubleshoot this error?

My setup is: MacBook Air (2018) macOS Big Sur 11.6

I'd appreciate any help. Thank you.

CodePudding user response:

Do a mv salesdataFeb23.csv.gzip salesdataFeb23.csv.gz, and try again.

CodePudding user response:

Other possible way (beside renaming the source file) is to use pipe like this:

cat salesdataFeb23.csv.gzip|gzip -dc >salesdataFeb23.csv

The cat command will send the content of the file (w/o the filename) and gzip will decompress it.

  • Related