initCommon(); $template->displayHeader(); ?>

3.4. Other rpm Command Options

Options such as -v (for more verbose output) work with the rpm command for installing, removing, and upgrading packages, as well as most other uses of the rpm command.

Other rpm command options, which work with most RPM actions, include --quiet to turn off most output except for errors, and --root, covered previously.

The --rcfile option tells the rpm command to use one or more other files to initialize the RPM system. These files tell the rpm command the system architecture, operating system, and default location of the RPM database, among a host of other settings.

Note

The term rc comes from Unix shells, with initialization files such as .cshrc for the C shell, csh. The term rc was originally a shorthand for run commands. An rc is a file of commands that run when the application starts up. For example, the C shell, csh, runs the commands in file named .cshrc when the shell starts.

In most cases, the application looks in the user home directory for a specific file tied to the application. For the rpm command, this file is .rpmrc. The leading period makes the file hidden for most directory listings.

In addition to the user-level file of commands, most applications supporting this mechanism have a way for site administrators to customize the command for all users. For example, your system may have a file named /etc/rpmrc (with no leading period) that customizes the rpm command for all users on your system. See page 427 for a more in-depth look at the chain of these files.

The syntax for the --rcfile option is

--rcfile filename

You can also supply more than one file name. This syntax follows:

--rcfile filename1:filename2:filename3

Separate each file name with a colon.

With Red Hat Linux, the default set of initialization files are:

/usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc:/etc/rpmrc:~/.rpmrc

Note

The ~/.rpmrc means to look in the user's home directory for a file named .rpmrc.

You can use the --showrc option to list all the rc settings.

Cross Reference

See Chapter 21 for more on the --showrc option.

The --version option tells the rpm command to print out the version number of the command and then exit. For example:

rpm --version

This command prints out a version number, like the following:

RPM version 4.1

The --dbpath option, mentioned previously, tells the rpm command to use a different RPM database. This is useful when testing a complete system install, where you want to change the RPM database but don't want that to affect your running Linux system. In this case, you can use a different RPM database and test out your changes. The basic syntax for this option is:

--dbpath directory_name

The --pipe option tells the rpm command to send, or pipe, its output to another program. The syntax for this option is:

--pipe command_to_send_out_to

displayFooter('$Date: 2005/11/02 19:30:06 $'); ?>