cli-tarHow do I create a .tar.gz file in Unix?
Creating a .tar.gz
file in Unix is a two-step process. First, the files need to be archived into a .tar
file, and then the .tar
file needs to be compressed into a .tar.gz
file.
- Create a
.tar
file:tar -cvf archive.tar file1 file2 file3
- Compress the
.tar
file into a.tar.gz
file:gzip archive.tar
This will create a file called archive.tar.gz
which contains all the files listed.
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 zip files?
- 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 create a tar.zip file in Unix?
- 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 compare Unix tar and zip files?
- How do I use gzip, tar, and zip to compress files?
See more codes...