Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Unzipping a .gz file without removing the gzipped file

I have a file file.gz, when I try to unzip this file by using gunzip file.gz, it unzipped the file but only contains extracted and removes the file.gz file.

How can I unzip by keeping both unzipped file and zipped file?
by

1 Answer

vishaljlf39
Without requiring a temporary file:
 zcat somefile.gz > somefile

Login / Signup to Answer the Question.