tar.gz file naming
Tar this is the file that is punched into a package, without compression;
GZ with gzip marked package. tar file compression;
So it becomes 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
Extract
TAR-ZXVF xxx.tar.gz
This will generate a directory 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. Usage of gzip
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. Compress with one command
#tar CVF-/etc/| GZIP-QC > backup.tar.gz
4. Release with one command complete
#gunzip-C backup.tar.gz | Tar xvf-
5. How to untie tar. Z 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 's bag?
#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 folder
Note: the. bz2 non-compressed format is not used frequently. Can man bzip2
8. How do I unzip the tar.bz2 bag?
Tar jxf linux-2.8.18.8.tar.bz2
tar.gz file naming and compression decompression method