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
How can I unzip by keeping both unzipped file and zipped file?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Here are several alternatives:
--keep option (version 1.6 or later)
Keep (don't delete) input files during compression or decompression.
gunzip -k file.gz
Pass the file to
gunzip as stdin
gunzip < file.gz > file
zcat (or, on older systems,
zcat file.gz > file