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
|
feedback
|
This question came from our site for professional and enthusiast programmers.
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.
|
You're looking for:
The
| |||||||||||||
feedback
|
|
You can the
More details on the manual page. | ||||
feedback
|
|
Use the
| |||
|
feedback
|
|
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. | |||||||
feedback
|
|
A simpler solution is to just use gunzip as a filter like this:
| |||
|
feedback
|
|
Gnu tar can read gzip files: | |||
|
feedback
|