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 can I use tar commands to zip a file?
- How do I use the tar command to compress files with gzip?
- How do I use tar and gzip to password protect a file?
- How do I use the Unix tar zip command?
- How do I use the command line to create a tar file?
- How do I use the tar command on Windows?
- How do tar gzip and zip differ in terms of file compression?
- How do I use gzip to compress a tar file on Windows?
- How do I use the command line to tar and zip files?
- How do I use the Unix tar xvf command to extract files?
See more codes...