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 use the command line to tar and zip a file?
- How do I use the Unix tar zip command?
- How do I create a tar.zip file in Unix?
- How do I create a tar.gz file using a shell script?
- How do I tar a folder and its subfolders in Unix?
- How do I use the command line to create a tar file?
- How do I use tar commands with xz?
- How do I extract files from a tar archive using the cmd command?
See more codes...