Наши партнеры








Книги по Linux (с отзывами читателей)

Библиотека сайта rus-linux.net

Two handy options

There are two options to rpm -i that work so well, and are so useful, you might think they should be RPM's default behavior. They aren't, but using them only requires that you type an extra two characters:

Getting a bit more feedback with -v

Even though rpm -i is doing many things, it's not very exciting, is it? When performing installs, RPM is pretty quiet, unless something goes wrong. However, we can ask for a bit more output by adding -v to the command:
# rpm -iv eject-1.2-2.i386.rpm
Installing eject-1.2-2.i386.rpm
#
          
By adding -v, RPM displayed a simple status line. Using -v is a good idea, particularly if you're going to use a single command to install more than one package:
# rpm -iv *.rpm
Installing eject-1.2-2.i386.rpm
Installing iBCS-1.2-3.i386.rpm
Installing logrotate-1.0-1.i386.rpm
#
          

In this case, there were three .rpm files in the directory. By using a simple wildcard, it's as easy to install one package as it is to install one hundred!

-h: Perfect for the Impatient

Sometimes a package can be quite large. Other than watching the disk activity light flash, there's no assurance that RPM is working, and if it is, how far along it is. If you add -h, RPM will print fifty hash marks ("#") as the install proceeds:
# rpm -ih eject-1.2-2.i386.rpm
##################################################
#
          
Once all fifty hash marks are printed, the package is completely installed. Using -v with -h results in a very nice display, particularly when installing more than one package:
# rpm -ivh *.rpm
eject          ##################################################
iBCS           ##################################################
logrotate      ##################################################
#