Unpack the RPM package with Linux commands and rpm command introduction _linux Shell

Source: Internet
Author: User
Tags bz2 gz file rar unpack uncompress

RPM is a red Hat (REDHAT) package management tool that implements features like Add/Remove Programs in Windows

RPM-IVH install_rpm

Tar xvf Informix-linux.tar

Inux to extract the command Daquan

. tar
Unpack: Tar xvf Filename.tar
Packing: Tar cvf filename.tar dirname
(Note: Tar is packed, not compressed!) )
———————————————
. gz
Decompression 1:gunzip filename.gz
Decompression 2:gzip-d filename.gz
Compression: gzip FileName
. tar.gz and. tgz
Decompression: Tar zxvf FileName.tar.gz
Compression: Tar zcvf FileName.tar.gz dirname
———————————————
. bz2
Decompression 1:bzip2-d filename.bz2
Decompression 2:BUNZIP2 filename.bz2
Compression: Bzip2-z FileName
. tar.bz2
Decompression: Tar jxvf FileName.tar.bz2
Compression: Tar jcvf FileName.tar.bz2 dirname
———————————————
. BZ
Decompression 1:bzip2-d filename.bz
Decompression 2:BUNZIP2 filename.bz
Compression: Unknown
. tar.bz
Decompression: Tar jxvf FileName.tar.bz
Compression: Unknown
———————————————
. Z
Decompression: uncompress filename.z
Compression: Compress FileName
. Tar. Z
Decompression: Tar zxvf filename.tar.z
Compression: Tar zcvf filename.tar.z dirname
———————————————
. zip
Decompression: Unzip Filename.zip
Compression: Zip Filename.zip dirname
———————————————
. rar
Decompression: rar x Filename.rar
Compression: rar a filename.rar dirname
———————————————
. Lha
Decompression: Lha-e Filename.lha
Compression: Lha-a Filename.lha FileName
———————————————
. rpm
Unpack: Rpm2cpio filename.rpm | Cpio-div
———————————————
. deb
Unpack: ar p filename.deb data.tar.gz | Tar zxf-
———————————————
. Tar. tgz. tar.gz. Tar. Z. tar.bz. tar.bz2. Cpio. rpm. Arj. Lha. Lzh. Lzx. Lzs. SDA. cab SFX. Lnx. P. SLP. Zoo. it. Sit. Sea
Decompression: sEx x filename.*
Compression: SEx a filename.* FileName

Sex just call the relevant program, itself and no compression, decompression function, please note!

gzip command

Reducing file size has two obvious benefits, one is to reduce storage space, and the other is to transfer files over the network, you can reduce the transmission time. Gzip is a regular use of Linux in the file compression and decompression of the command, both convenient and useful.
Syntax: gzip [option] Compress (uncompress) file name the options for this command have the following meanings:

-C writes the output to the standard output and retains the original file. -D Unzip the compressed file. -L Displays the following fields for each compressed file: The size of the compressed file, the size of the uncompressed file, the compression ratio, the name of the uncompressed file-R recursively finds the specified directory and compresses all of its files or is uncompressed. -T test to check that the compressed file is complete. -V displays filename and compression ratio for each compressed and decompressed file. -num adjusts the speed of the compression with the specified number num,-1 or--fast represents the fastest compression method (low compression ratio),-9 or--best represents the slowest compression method (high compression ratio). The default value for the system is 6. Instruction instance:
Gzip *% compresses each file in the current directory into a. gz file. GZIP-DV *% extracts each compressed file in the current directory and lists detailed information. Gzip-l *% details the information for each compressed file in Example 1 and does not understand the pressure. GZIP usr.tar% Compressed tar backup file Usr.tar, at which time the compressed file extension is. tar.gz.

Introduction to RPM command usage

What is RPM? RPM is the abbreviation of RPM Package Manager, the first package standard proposed by Redhat company, and then with the development of RPM, it adds many functions, and gradually becomes the standard of Linux package management. Vendors supporting this format are Redhat Linux, SuSE Linux, Mandriva Linux.

RPM commands are very powerful, so what is the function of the RPM command?

1 to inquire about the RPM package installed in the Linux system
2 Query the RPM package installation file information
3 Installing the RPM package to the current Linux system
4 Uninstall the installed RPM package from the Linux system
5 Upgrade the current Linux system RPM package

(1) #rpm-qa after the parameter is used to view all the RPM packages that have been installed in the system
(2) #rpm-Q RPM Package name to see if the software package is installed in the system, if installed, the system will display the full package name, if not installed, the system will prompt "package BAS is not installed".
(3) #rpm-qi RPM package name is used to view the complete information of the RPM package already installed in the system, including the version information of the package, installation time and size, etc.
(4) #rpm-ql RPM package name to see where the package is installed.
(5) #rpm-QF file name is used to view a file installed using that RPM package.
(6) #rpm-qpi RPM package name and #rpm-qpl are used to view information about packages that are not installed, and note the difference between (4) and (5).
(7) #rpm-IVH package name for installation of the RPM package, I on behalf of the installation, V on behalf of the visual installation, H represents the installation of the time display progress.
(8) #rpm--force-irpm package is used to force the installation of RPM packages,--force parameters are used to install dependencies on the RPM package. But generally we do not do, the better way to resolve dependencies is to use the #rpm-i command to install together.
(9) #rpm-E RPM package name is used to remove the RPM package. The RPM-E--nodeps package name is used to delete a dependency-dependent package that deletes all packages that have dependencies on the package.
(Ten) #rpm-urpm package name for the upgrade of the RPM package.

The above is a small set for you to introduce the RPM package of the Linux command and RPM command usage profile, I hope you like.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.