I have a file called file1.atz. I know that it is gzipped. The uncompressed file extension should be .ats. I have read the man pages and I just want to verify I'm uncompressing this correctly, because the program that's supposed to read this file isn't able to (which could be for other reasons, I'm just trying to isolate the problem). So if I do this:

gzip -S atz file1.atz

I'm then left with a file called file1. (note the .). Did I unzip that correctly? Then I just manually rename with a mv file1. file1.ats to get what I want?


Yes, but easier would be to decompress it to stdout and then redirect it.

gunzip -c -S atz file1.atz > file1.ats
| improve this answer | |

You can avoid problems with file name suffixes by using gzip as a filter:

 $ gzip -dc < file1.atz > file1.ats
| improve this answer | |
  • 2
    Or simply: gunzip < file1.atz > file1.ats (the -c is superfluous when gzip is not passed any file name). – Stéphane Chazelas Feb 7 '13 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.