cli-tarHow do I tar gzip a directory?
To tar gzip a directory, use the tar command with -z and -c flags.
tar -zcvf <name_of_archive>.tar.gz <name_of_directory>
This will create a tar.gz archive with the contents of the specified directory.
The flags used are:
-z: Compress the resulting archive with gzip.-c: Create a new archive.-v: Verbosely list files which are processed.-f: Specify the filename of the archive.
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 Unix tar xvf command to extract files?
- How do I use the shell to tar and zip files?
- How do I use the Unix tar zip command?
- How do I use gzip and tar in Linux?
- How do I choose between gzip and tar.gz when compressing files?
- How do I use the command line to tar and zip a file?
- How do I use the tar command on Windows?
- How do I use the command line to create a tar file?
See more codes...