cli-tarHow do I gzip a tar file?
To gzip a tar file, you can use the following command:
tar -zcvf <output_file.tar.gz> <input_file.tar>
This command will create a gzipped tar file called output_file.tar.gz
based on the input_file.tar
. The flags used are:
z
for gzip compressionc
to create a new archivev
for verbose outputf
to specify the output file
The output of the command will look like this:
input_file.tar
input_file.tar
input_file.tar
...
To uncompress the tar file, you can use the command:
tar -zxvf <input_file.tar.gz>
This will extract the files from the gzipped tar file. The flags used are:
z
for gzip decompressionx
to extract files from the archivev
for verbose outputf
to specify the input file
The output of the command will look like this:
input_file.tar
input_file.tar
input_file.tar
...
Helpful links
More of Cli Tar
- How do I use the Unix tar zip command?
- How do I use the command line to tar and distribute files?
- How do I create a tar.zip file in Unix?
- How do I use the Unix tar xvf command to extract files?
- 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 gzip, tar, and zip to compress files?
- How do I use the shell to tar and zip 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?
See more codes...