cli-tarHow do I extract a tar.gz file using the command line?
To extract a tar.gz file using the command line, use the following syntax:
tar -xzvf <filename>.tar.gz
The parts of the code are as follows:
tar
: the command to extract files-xzvf
: the options for the command, which stands for "extract, gzip, verbose, file"<filename>.tar.gz
: the name of the file to be extracted
The output of the command should look something like this:
x file_1.txt
x file_2.txt
x file_3.txt
This shows the command successfully extracting the files in the tar.gz archive.
Helpful links
More of Cli Tar
- How do I use the command line to tar and zip files?
- How do I use the Unix tar zip command?
- How do I use gzip, tar, and zip to compress files?
- How can I use tar commands to zip a file?
- How do I use the command line to tar and distribute files?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and zip a file?
- How do I use the shell to tar and zip files?
- How do I create a tar.zip file in Unix?
- How do I compare Unix tar and zip files?
See more codes...