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.

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
1  
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
1  
What does file txt.gz say? –  angus Nov 16 '12 at 13:26
1  
$ file file.txt.gz file.txt.gz: data –  Shraddha Nov 16 '12 at 13:28
2  
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
1  
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
show 1 more comment

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.

1 Answer

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
3  
Then your file seems to be arbitrary data or at least not any known compressed format. –  Olaf Dietsche Nov 16 '12 at 13:32
add comment

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