Posts

A-Z Index of the Apple OS X command line

The tcsh command shell of Darwin (the open source core of OSX) alias Create an alias alloc List used and free memory awk Find and Replace text within file(s) basename Convert a full pathname to just a folder path bash Bourne-Again SHell (Linux) bless Set volume bootability and startup disk options. break Exit from a loop cal Display a calendar case Conditionally perform a command cat Display the contents of a file cd Change Directory chflags Change a file or folder's flags. chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory cksum Print CRC checksum and byte counts clear Clear terminal screen cmp Compare two files comm Compare two sorted files line by line complete Edit a command completion [word/pattern/list] continue Resume the next iteration of a loop cp

A-Z Index of the Linux BASH command line

alias Create an alias apropos Search Help manual pages (man -k) awk Find and Replace text, database sort/validate/index break Exit from a loop builtin Run a shell builtin bzip2 Compress or decompress named file(s) cal Display a calendar case Conditionally perform a command cat Display the contents of a file cd Change Directory cfdisk Partition table manipulator for Linux chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory cksum Print CRC checksum and byte counts clear Clear terminal screen cmp Compare two files comm Compare two sorted files line by line command Run a command - ignoring shell functions continue Resume the next iteration of a loop cp Copy one or more files to another location cron Daemon to execute scheduled commands crontab Schedule a command to run at a later time c

Uninstalling RMP

Uninstalling a package is just as simple as installing one. Type the following command at a shell prompt: rpm -e foo Note Notice that we used the package namefoo, not the name of the original package filefoo-1.0-1.i386.rpm. To uninstall a package, replace foo with the actual package name of the original package. You can encounter a dependency error when uninstalling a package if another installed package depends on the one you are trying to remove. For example: error: Failed dependencies: foo is needed by (installed) bar-2.0.20-3.i386.rpm To make RPM ignore this error and uninstall the package anyway (which may break the package dependent on it) use the --nodeps option.

Unresolved Dependency

RPM packages may sometimes depend on other packages, which mean that they require other packages to be installed to run properly. If you try to install a package which has an unresolved dependency, output similar to the following is displayed: error: Failed dependencies: bar.so.2 is needed by foo- 1.0-1 Suggested resolutions: bar-2.0.20-3.i386.rpm If you are installing a package from the Red Hat Enterprise Linux CD- ROM set, it usually suggests the package(s) needed to resolve the dependency. Find the suggested package(s) on the Red Hat Enterprise Linux CD- ROMs or from Red Hat Network, and add it to the command: rpm -ivh foo-1.0-1.i386.rpm bar-2.0.20-3.i386.rpm If installation of both packages is successful, output similar to the following is displayed: Preparing... ########################################### [100%] 1:foo ########################################### [ 50%] 2:bar ########################################### [100%] If it does not suggest a package to resolve the dependenc

Conflicting Files

If you attempt to install a package that contains a file which has already been installed by another package, the following is displayed: Preparing... ########################################### [100%] file /usr/bin/foo from install of foo-1.0-1 conflicts with file from package bar-2.0.20 To make RPM ignore this error, use the --replacefiles option: rpm -ivh --replacefiles foo-1.0-1.i386.rpm

Package Already Installed

If a package of the same name and version is already installed, the following output is displayed: Preparing... ########################################### [100%] package foo-1.0-1 is already installed However, if you want to install the package anyway, you can use the -- replacepkgs option, which tells RPM to ignore the error: rpm -ivh --replacepkgs foo-1.0-1.i386.rpm This option is helpful if files installed from the RPM were deleted or if you want the original configuration files from the RPM to be installed.

Installing RPM

RPM packages typically have file names like foo-1.0-1.i386.rpm. The file name includes the package name (foo), version (1.0), release (1), and architecture (i386). To install a package, log in as root and type the following command at a shell prompt: rpm -ivh foo-1.0-1.i386.rpm Alternatively, the following command can also be used: rpm -Uvh foo-1.0-1.i386.rpm If the installation is successful, the following output is displayed: Preparing... ########################################### [100%] 1:foo ########################################### [100%] As you can see, RPM prints out the name of the package and then prints a succession of hash marks as a progress meter while the package is installed. The signature of a package is checked automatically when installing or upgrading a package. The signature confirms that the package was signed by an authorized party. For example, if the verification of the signature fails, an error message such as the following is displayed: error: V3 DSA signa