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 do I use the Unix tar zip command?
- How do I use the command line to tar and distribute files?
- How do I use tar and gzip to password protect a file?
- How do I use the shell to tar and zip files?
- How do I use the command line to tar and zip a file?
- How do I use the command line to tar and zip a file?
- How can I use the CLI tar yarn command to compress files?
- How do I use the Unix tar xzvf command?
- How do I use the Unix tar xvf command to extract files?
See more codes...