Unzipping a .gz file without removing the gzipped file
Here are several alternatives:
Give
gunzip
the--keep
option (version 1.6 or later)-k
--keep
Keep (don't delete) input files during compression or decompression.gunzip -k file.gz
Pass the file to
gunzip
as stdingunzip < file.gz > file
Use
zcat
(or, on older systems,gzcat
)zcat file.gz > file
Without requiring a temporary file:
zcat somefile.gz > somefile