After a long time of studying Linux compression programs, we will introduce the Linux compression program in a comprehensive manner to give readers a preliminary understanding of Linux. It involves file management, disk management, user and group management, man help, software package management, File compression, and printer management.
Tar call gzip
The linuxcompression program is a gnuorganization Development Program. The file ending with .gz is the result of Linux compression program compression. The decompress program relative to gzip is gunzip. Use the-z parameter in tar to call gzip. The following is an example:
# Tar-czf all.tar.gz *. jpg
Bytes
# Tar-xzf all.tar.gz is used to unbind the generated package.
Tar call bzip2
Bzip2is a more powerful compression program. The file ending with .bz2 is the result of bzip2 compression. The decompress program relative to bzip2 is bunzip2. Use the-j parameter in tar to call gzip. The command # tar-cjf all.tar.bz2 *. jpg # tar-xjf all.tar.bz2 is used to unbind the generated package.
Tar call compress
Compress is also a compression program, but it seems that there are not as many people using compress as Linux gzip and bzip2 .. The file ending with Z is the result of bzip2 compression. The decompress program relative to compress is uncompress. Use the-Z parameter in tar to call Linux gzip. The following is an example: # tar-cZf all.tar. Z *. jpg
Forbidden. Z
# The tar-xZf all.tar. Z command is used to unbind the generated package.
With the above knowledge, you should be able to uncompress a variety of compressed files. The following is a summary of the compressed files in the tar series:
1st pair of files ending with .tar
Tar-xf all.tar
2XX for the file ending with .gz
Gzip-d all.gz
Gunzip all.gz
32.16.tgzor .tar.gz
Tar-xzf all.tar.gz
Tar-xzf all. tgz
4)for the file ending with .bz2
Bzip2-d all.bz2
Bunzip2 all.bz2
5 bytes for the file ending with tar.bz2
Tar-xjf all.tar.bz2
6) for files ending with. Z
Uncompress all. Z
72.16.tar. Z
Tar-xZf all.tar. z
In addition, the Linux compression program has corresponding methods to decompress the compressed files .zipand .rar in Windows:
For. Zip
The Linux compression program provides zip and unzip programs, zip is a compression program, and unzip is a decompression program. They have many Parameter options. Here we will only give a brief introduction and give examples to illustrate their usage:
# Zip all.zip *. jpg
This command compresses all .jpg files into a zip package.
# Unzip all.zip
This command decompress all files in all.zip.
For .rar
To process the. RAR file in the linuxcompressed path, you need to install RAR for Linux, which can be downloaded from the Internet, but remember, RAR for Linux
Not free; then install:
# Tar-xzpvf rarlinux-3.2.0.tar.gz
# Cd rar
# Make
After installation, there will be two programs, rar and unrar. rar is a compression program, and unrar is a decompression program. They have many Parameter options. Here we will only give a brief introduction and give examples to illustrate their usage:
# Rar a all *. jpg
This command is to compress all. jpg files into a rarpackage named all.rar. the program will automatically append the. rar extension name to the package name.
# Unrar e all.rar
This command is to extract all files from all.rar.
So far, we have introduced tar, linux gzip, gunzip, bzip2, bunzip2, compress, uncompress, example, and ,. these 10 types of compressed files, zw..tar.zw..zipw.rar, have been decompressed. In the future, you should not have to worry about downloading a software and not knowing how to unbind it in Linux. In addition, the above method is basically effective for Unix.
This article describes the Linux compressed files tar, Linux gzip, gunzip, bzip2, bunzip2, Ghost,. tgz、.bz22.16.tar.bz22.16.z2.16.tar.z#.zip#.rar.
- Overview
- Command Daquan: Linux crond Parsing
- How to install realplayer in Linux
- Analyze svn commands from Linux
- Linux operating system installation iscsi connection IP-SAN disk details