Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to uncompress txt.gz files on Linux. gzip, gunzip, unzip are not recognizing the file format. The archive is guaranteed to be not corrupted.

share|improve this question

closed as unclear what you're asking by Anthon, jasonwryan, Renan, manatwork, slm Nov 22 '13 at 11:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

What is the error? If it is truly not corrupted and is a gzip file, gzip -d will do it. – Chris Down Nov 16 '12 at 13:24
What does file txt.gz say? – angus Nov 16 '12 at 13:26
$ file file.txt.gz file.txt.gz: data – Shraddha Nov 16 '12 at 13:28
Either the files are already uncompressed and contain data or text in an encoding file doesn't recognize (try it: rename one to file.txt and open it in an editor), or you should talk with whoever guaranteed you they aren't corrupted. – angus Nov 16 '12 at 13:40
Add the output of hd file.txt.gz | head - 8 to your question and we will be able to answer. – Jim Paris Nov 16 '12 at 15:54

unzip is for .zip files not for .gz. Try first

file abc.txt.gz

This will tell you, if it is a .gz, .zip, .bz or any other file. You can then choose the appropriate program.

share|improve this answer
see my comments ^^^^^ – Shraddha Nov 16 '12 at 13:30
Then your file seems to be arbitrary data or at least not any known compressed format. – Olaf Dietsche Nov 16 '12 at 13:32

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