cli-tarHow do I decompress a tar.gz file using gzip?
Decompressing a tar.gz file using gzip is a simple process. First, the tar.gz file must be downloaded and saved to a location on the computer. Then, the following command can be used to decompress the file:
$ tar -xzvf <file_name>.tar.gz
This command will extract the file from the tar.gz archive. The parts of this command are:
tar: The tar command is used to create and extract archives from a file or directory.-xzvf: This option is used to extract the files from the archive.<file_name>: This is the name of the tar.gz file.
The output of the command should look something like this:
$ tar -xzvf <file_name>.tar.gz
x <file_name>/
x <file_name>/<file_1>
x <file_name>/<file_2>
...
The files will be extracted from the tar.gz archive and saved in the same directory as the archive.
Helpful links
More of Cli Tar
- How do I use the tar command line in Windows 10?
- How do I use the command line to tar and zip files?
- How do I use the Unix tar zip command?
- How can I fix an unexpected end of file error when compressing a file with tar and gzip?
- How do I use the command line to tar and distribute files?
- How do I use the Unix tar xvf command to extract files?
- How do I use the tar command on Windows?
- How do I use the tar command in Windows command line?
- How do I use tar, gzip, and SSH together to transfer files?
- How do I unpack a tar file using the terminal?
See more codes...