cli-tarHow do I gzip a tar file?
To gzip a tar file, you can use the tar
command in combination with the gzip
command. The syntax for this is:
tar -zcvf <output_file_name>.tar.gz <input_file_name>
This will create a gzipped tar file named <output_file_name>.tar.gz
containing the <input_file_name>
.
Code explanation
tar
: the tar command used to create a tar file-zcvf
: the flags used to indicate gzip compression and create a tar archive<output_file_name>.tar.gz
: the name of the output file<input_file_name>
: the name of the input file
Helpful links
More of Cli Tar
- How can I use tar commands to 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 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 files?
- How do I use gzip, tar, and zip to compress files?
- How do I use the command line to tar and zip a file?
- How do I use the Unix tar xzvf command?
- How do I use the command line to tar and zip a file?
See more codes...