tar.gz file naming
Tar is to make a file into a package, not compressed;
GZ is compressed with a. Tar file that is packed in gzip.
So it became a. tar.gz file
Compression
# tar Cvfz backup.tar.gz/xxx/
-C,--create
Create a new archive
-V,--verbose
verbosely List Files processed
-F,--file [hostname:]f
Use archive file or device F (default/dev/rmt0)
-Z,--gzip,--ungzip
Filter the archive through Gzip decompression
TAR-ZXVF xxx.tar.gz
This will generate a folder named after the file name
-Z,--gzip,--ungzip
Filter the archive through gzip
-X,--extract,--get
Extract files from an archive
-V,--verbose
verbosely List Files processed
-F,--file [hostname:]f
Use archive file or device F (default/dev/rmt0)
view a list of files
Tar-tvzf *.tar.gz
-T,--list
List the contents of an archive
remaining Options
-R,--append
Append files to the end of an archive Read more:tar,gzip how to use
1. Compress a set of files as tar.gz suffixes.
# tar cvf backup.tar/etc # gzip-q Backup.tar
Or
# tar Cvfz backup.tar.gz/etc/
2. Release a file with a suffix of tar.gz.
# gunzip backup.tar.gz #tar xvf Backup.tar
Or
# tar Xvfz backup.tar.gz
3. Complete the compression with one command
#tar CVF-/etc/| GZIP-QC > backup.tar.gz
4. Complete the release with one command
#gunzip-C backup.tar.gz | Tar xvf-
5. How to unpack the tar. Z's file.
# tar Xvfz backup.tar.z
Or
# uncompress Backup.tar.z #tar xvf Backup.tar
6. How to unlock the. tgz file.
#gunzip backup.tgz
7. How to compress and decompress. bz2 package.
#bzip2/etc/smb.conf This compresses the file smb.conf into smb.conf.bz2
#bunzip2/etc/smb.conf.bz2 This will restore smb.conf.bz2 to smb.conf in the current directory
Note: the. BZ2 compression format is not very common and can be man bzip2
8. How to unzip the TAR.BZ2 package.
Tar jxf linux-2.8.18.8.tar.bz2