1. I want to install the xx.rpm.
rpm -ivh xx.rpm
i means intall, v means verbose, h means hash marks.
2. I want to upate the xx.rpm.
rpm -Uvh xx.rpm
U means update.
3. I want to query if the xx.rpm has been installed.
rpm -q xx.rpm
q means query
4. I want to query all rpm packages that has been installed.
rpm -qa
a means all
5. I want to query the dependant files if I want to install the xx.rpm successful.
rpm -qR xx.rpm
R means required
6. I want to query what rpm package the file xx belongs to.
rpm -qf xx
f means file
7. I want to uninstall xx.rpm.
rpm -e xx
e means erase.
8. I want to query the detail about a package.
rpm -qip xx.rpm
i means info, p means package.