1

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?

2 Answers 2

5

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

gunzip -c -S atz file1.atz > file1.ats
0
3

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

 $ gzip -dc < file1.atz > file1.ats
1
  • 2
    Or simply: gunzip < file1.atz > file1.ats (the -c is superfluous when gzip is not passed any file name). Feb 7, 2013 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .