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:
zfor gzip compressioncto create a new archivevfor verbose outputfto 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:
zfor gzip decompressionxto extract files from the archivevfor verbose outputfto 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 tar command in a CMD prompt?
- How do I use the command line to tar and zip files?
- How do I use tar commands with xz?
- How do I use the tar command line in Windows 10?
- How do I use gzip and tar in Linux?
- How can I use tar commands to zip a file?
- How do I create a tar.zip file in Unix?
- How do I use the tar command on Windows?
- How do I use the Unix tar zip command?
- How do I use the command line to create a tar file?
See more codes...