To use education and knowledge for innovation in the field of information technology and administration with an organization that has a strong sense of unity and purpose.

Wednesday, August 20, 2008

Linux Issues

Under Construction

1 comment:

Ishwar Mohanchandra Wagh said...

Q. What is the command to display package information ?
Ans. # rpm -qi foo

- This command display package information including the package name, version, and description of the installed program. Use this command to get detailed information about the installed package

Q. What is the command to list files in installed package ?
Ans. # rpm -ql foo

- This command will list all of files in an installed RPM package. It works only when the package is already installed on your Linux system.

Q. What is the command to to find which package owns a file ?
Ans. # rpm -qf /usr/bin/mysql
Output- mysql-3.23.52-3

- This command checks to determine which installed package a particular file belongs to.

Q. How will you list files in RPM file ?
Ans. # rpm -qpl kernel-2.4.20-18.10.1.i686.rpm

- This command allows you to query a (possibly) uninstalled RPM file with the use of the the "-p" option. You can use the "-p" option to operate on an RPM file without actually installing anything.

Q. How to verify an installed package ?
Ans. # rpm --verify mysql

- This command will list all files that do NOT pass the verify tests (done on size, MD5 signature, etc). Where a file does NOT pass, the output is listed using the following codes that signify what failed:

S File size
M Mode (includes permissions and file type)
5 MD5 sum
L Symlink
D Device
U User
G Group
T Mtime

Take for example the following:

# rpm --verify mysql
S.5....T c /etc/my.cnf

This example indicates that file /etc/my.cnf failed on:

File size
MD5 Sum
Modified Time

However, the "c" tells us this is a configuration file so that explains the changes. It should still be looked at to determine what the changes were.

Q. How to check a RPM signature package ?
Ans. # rpm --checksig foo

- This command checks the PGP signature of specified package to ensure its integrity and origin. Always use this command first before installing a new RPM package on your system. Also, GnuPG or Pgp software must be already installed on your system before you can use this command.