cli-tarHow do I decompress a tar.gz file using the command line?
Decompressing a tar.gz file using the command line is a simple process.
The basic command to use is tar -xzvf <filename.tar.gz>, where <filename.tar.gz> is the name of the file you are decompressing.
For example, if the file you are decompressing is called example.tar.gz, you would use the command:
tar -xzvf example.tar.gz
This command will output a list of the files that are being decompressed:
x example/
x example/file1.txt
x example/file2.txt
The -x flag tells tar to extract the files. The -z flag tells tar to decompress the file using gzip compression. The -v flag stands for verbose, which means it will output the list of files it is extracting. The -f flag tells tar which file to extract from.
You can find more information about the tar command here.
More of Cli Tar
- How do I use the command line to tar and zip files?
- How can I use tar commands to zip a file?
- How do I use the shell to tar and zip files?
- How do I use the Unix tar zip command?
- How do I create a tar.zip file in Unix?
- 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 gzip, tar, and zip to compress files?
- 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?
See more codes...