The default behavior of gunzip is to delete the .gz file after it decompresses.
How do I prevent it from deleting the file??
If this functionality is not included then is there an alternative program that allows this?
I'm using Ubuntu 9.04
|
|
|
You're looking for:
The
Note that on some systems gzcat is also known as |
|||||||||||||||||||
|
|
You can the
More details on the manual page. |
||||
|
|
A simpler solution is to just use gunzip as a filter like this:
|
|||
|
|
|
Use the
|
|||
|
|
|
If it's actually a tarball (.tgz or .tar.gz extension), then instead of redirecting to file like all of the answers so far, you'll want to pipe it to tar, like so:
so that you get the actual contents. |
|||||||
|
|
Gnu tar can read gzip files: |
|||
|
|
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.