Uncompress txt.gz files
25,519
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.
Related videos on Youtube
Author by
Shraddha
Updated on September 18, 2022Comments
-
Shraddha almost 2 years
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.
-
clerksx over 11 yearsWhat is the error? If it is truly not corrupted and is a gzip file,
gzip -d
will do it. -
angus over 11 yearsWhat does
file txt.gz
say? -
Shraddha over 11 years$ file file.txt.gz file.txt.gz: data
-
Shraddha over 11 years$ gzip -d file.txt.gz gzip: file.txt.gz: not in gzip format
-
angus over 11 yearsEither the files are already uncompressed and contain data or text in an encoding
file
doesn't recognize (try it: rename one tofile.txt
and open it in an editor), or you should talk with whoever guaranteed you they aren't corrupted. -
cheshirecatalyst over 11 yearsAdd the output of
hd file.txt.gz | head - 8
to your question and we will be able to answer.
-
-
Shraddha over 11 yearssee my comments ^^^^^
-
Olaf Dietsche over 11 yearsThen your file seems to be arbitrary data or at least not any known compressed format.