Zip is probably the most used document compression format. Its greatest advantage is in the use of different operating system platforms, such as Linux, Windows and Mac OS. The downside is that the compression ratios are not very high, and tar.gz and TAR.GZ2 are doing very well in terms of compression. Gossip less, let's get to the point:
We can compress a directory with the following commands:
# zip-r Archive_name.zip directory_to_compress
The following is if you unzip a zip document:
# Unzip Archive_name.zip
TAR
Tar is a very extensive document packaging format used in Linux. The advantage is that it consumes very little CPU and time to package files, he is just a packaging tool, not responsible for compression. Here's how to package a directory:
# TAR-CVF Archive_name.tar directory_to_compress
How to unpack the package:
# TAR-XVF Archive_name.tar.gz
This unpacking command will unlock the document under the current directory. Of course, you can also use this command to squeeze the path of the unpacking:
# TAR-XVF Archive_name.tar-c/tmp/extract_here/
TAR. GZ
This format is the most compressed format I have used. It does not take up too much CPU when compressing, and it can get a very ideal compression rate. Use the following format to compress a directory:
# TAR-ZCVF archive_name.tar.gz directory_to_compress
Unzip:
# TAR-ZXVF Archive_name.tar.gz
This unpacking command will unlock the document under the current directory. Of course, you can also use this command to squeeze the path of the unpacking:
# TAR-ZXVF Archive_name.tar.gz-c/tmp/extract_here/
TAR. BZ2
This compression format is the best compression rate in all of the ways we mentioned. This, of course, means that it consumes more CPU and time than the previous way. This is how you use tar.bz2 for compression.
# TAR-JXVF archive_name.tar.bz2 directory_to_compress
This unpacking command will unlock the document under the current directory. Of course, you can also use this command to squeeze the path of the unpacking:
# TAR-JXVF Archive_name.tar.bz2-c/tmp/extract_here/
Deb files can be installed Dpkg-i file.deb, Dpkg-r (or P) file is used to uninstall
(P is a complete uninstall, including the relevant configuration file);
The bin file is available for direct operation and, of course, also helpful./file.bin--help Sometimes you can view help information;
chmod a+x file.bin Set executable permissions, and then double-click or./file.bin if it is not in the current directory, specify an absolute path;
RPM Software Package Installation:
RPM-IVH software name. RPM (This is used to install a new RPM package)
RPM-UVH software name. RPM (This is used to upgrade an RPM package, that is, the system already has the old version of this software, so that
Use this command to upgrade the old version to a new version)
For example, I want to install Firefox is:
RPM-IVH firefox-2.0.0.1.rpm
Installation of tgz or tar.gz:
Tgz (or tar.gz) is a compressed file format under Linux, such as. rar or. zip under Windows, which must be decompressed first
Out, you can use the command:
(i) TAR-ZXVF software name. tgz (or. tar.gz) [Unzip to current directory]
(for example, I want to decompress firefox-2.0.0.1.tgz or. tar.gz, which is TAR-ZXVF firefox-
2.0.0.1.tgz or. tar.gz, after decompression in the current directory generated a Firefox directory, which contains the configuration
and compile the required files)
(ii) The directory after the CD is extracted [switch to the unpacked directory]
(such as CD firefox, switch to the Firefox directory)
(iii) then execute./configure [Install settings, there will be a lot of characters, wait a while]
(d) Wait until the configuration is complete. [Compile, wait a minute]
(v) post-compilation make install [install]
(vi) Final make clean [erase some files compiled by Config]
How to create and unzip under Linux, install Zip, tar, tar.gz and tar.bz2 files