cli-tarHow do I use tar and gzip in Linux?
Tar and gzip are two of the most popular archiving and compression utilities for Linux.
tar -cvzf archive.tar.gz <files>
This command will create an archive file called archive.tar.gz, containing all the files listed in <files>.
tar: creates an archive file-c: creates a new archive-v: verbose output-z: compress the archive with gzip-f: specifies the name of the archive
The archive can be extracted with:
tar -xvzf archive.tar.gz
-x: extract files from the archive
Links:
More of Cli Tar
- How do I use the Unix tar zip command?
- How do I create a tar.zip file in Unix?
- How can I use the CLI to yield a tar file?
- How do I use the tar command to compress files with gzip?
- How can I use gzip to compress a file without using tar?
- How do I create a Unix tar archive with a password?
- How can I decide between using tar gzip and bzip2 for compressing files?
- How do tar gzip and zip differ in terms of file compression?
- How do I use the command line to create a tar file?
- How do I use the tar command on Windows?
See more codes...