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 command line to tar and zip files?
- How do I use the Unix tar zip command?
- How can I use tar commands to zip a file?
- 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 the tar command to compress files with gzip?
- How do tar gzip and zip differ in terms of file compression?
- How do I use the tar command line in Windows 10?
- How do I choose between gzip and tar for compressing a file?
- How can I use the CLI tar yarn command to compress files?
See more codes...