Forrest logo
back to the gunzip tool

gunzip:tldr:3148b

gunzip: Extract a file and keep the archive file.
$ gunzip --keep ${archive-tar-gz}
try on your machine

The command "gunzip --keep ${archive-tar-gz}" is used to decompress a file or multiple files with the ".tar.gz" extension. Here's the breakdown of the command:

  • "gunzip" is a command-line program that is used for decompressing files. It is often used to extract files from archives compressed with the gzip compression algorithm.

  • "--keep" is an option used with the gunzip command. It tells the command to keep the original compressed file(s) after decompression. By default, gunzip removes the original file after successfully decompressing it.

  • "${archive-tar-gz}" is a placeholder for the name of the file or files you want to decompress. In this case, it is a variable, and its actual value will depend on how it's defined or passed to the command. If you execute this command directly, you need to replace "${archive-tar-gz}" with the actual filename(s) you want to decompress. For example, if you want to decompress a file called "archive.tar.gz", you would replace "${archive-tar-gz}" with "archive.tar.gz".

So, when you execute this command, it will decompress the specified ".tar.gz" file(s) while keeping the original compressed file(s) unchanged.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gunzip tool