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
.tarfile:tar -cvf archive.tar file1 file2 file3 - Compress the
.tarfile into a.tar.gzfile: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 command line to tar and zip files?
- How can I use tar commands to zip a file?
- How do I create a tar.zip file in Unix?
- How do I use tar gzip with a password?
- How do I use the Unix tar xvf command to extract files?
- How do I use the tar command on Windows?
- How do I open a .tar.gz file using the command line?
- How do I use gzip, tar, and zip to compress files?
- How do I use the Unix tar zip command?
- How do I extract files from a tar archive using the cmd command?
See more codes...