I would like to give some examples which can help everyone to refer the rpm command options in Linux OS.
1. To install a package
S - file size differs
1. To install a package
#rpm –ivh packagename [install –i ,verbose –v
, h – hash in the output]
2. To query a package
#rpm –q packgename
#rpm –qa packagename*
#rpm –qa|grep packahe
3. Query RPM
Packages in a various format using rpm –queryformat
Note: Just check the output , how it is showing the package version with release and arch details. This is very interesting and helpful command for me.
4. Which RPM
package does a file belong to? – Use rpm -qf
5. Locate
documentation of a package that owns file using rpm -qdf

6. Information about Installed RPM Package using rpm -qi
7. If
you have an rpm file that you would like to install, but want to know more
information about it before installing, you can do the following
8. List all the Files in a Package using rpm -qlp
Note: This is also a very useful command to know about the files in a package. I prefer to verify/check the files instead of blindly installing it.
9
9. List the Dependency Packages using rpm –qRP

10. Upgrading a RPM Package using rpm –Uvh
#rpm –Uvh sendmail.rpm
11. To uninstall a package
#rpm –e packagename
12. To verify all packages
#yum –Va
13. Verify a Package Owning file using rpm -Vf
5 - MD 5 Sum differs
T - mTime differs
No comments:
Post a Comment
Thank you !!