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 can I use tar commands to zip a file?
- How do I use the Unix tar zip command?
- How do I use the command line to tar and distribute files?
- How do I use the command line to create a tar file?
- How do I use gzip to compress a tar file on Windows?
- How do I use the tar command to compress files with gzip?
- How do I extract a .xz file using the command line?
- How do I use tar gzip with a password?
- How do I use the tar command on Windows?
- How do I use the tar command line in Windows 10?
See more codes...