Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

Sorry if this is a stupid question, I just couldn't find much out there about un-gzipping non-traditional file extensions.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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

gunzip -c -S atz file1.atz > file1.ats
share|improve this answer
Thanks a lot, this is straightforward and a one-liner. –  unexpected62 Feb 7 '13 at 17:02

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

 $ gzip -dc < file1.atz > file1.ats
share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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