One imp thing about
RPM is that it queries The RPM database in /var/lib/rpm for the rpm
which you run like rpm -ql package name etc

All the files inside /var/lib/rpm is data files .You can check with file *



Regards,

Siddharth


--- On Tue, 3/3/09, b.sadhiq <[email protected]> wrote:
From: b.sadhiq <[email protected]>
Subject: [Linux_Mantra] Daily Tips
To: [email protected]
Date: Tuesday, March 3, 2009, 10:16 PM











    
             RPM Usage Summary.



Install. Full filename is needed.



$ rpm -ivh Fedora/RPMS/ postgresql- libs-7.4. 2-1.i386. rpm



To view list of files installed with a particular package.



$ rpm -ql postgresql-libs

                /usr/lib/libecpg. so.4

                /usr/lib/libecpg. so.4.1

                /usr/lib/libecpg_ compat.so. 1

                /usr/lib/libecpg_ compat.so. 1.1

                /usr/lib/libpgtypes .so.1

                ...



Or, to get the file listing from a package that is not installed use the

     "-p" option.



$ rpm -pql /iso0/Fedora/ RPMS/libpcap- 0.8.3-7.i386. rpm

               /usr/share/doc/ libpcap-0. 8.3/CHANGES

               /usr/share/doc/ libpcap-0. 8.3/LICENSE

               /usr/share/doc/ libpcap-0. 8.3/README

               /usr/share/man/ man3/pcap. 3.gz



Note, you can also get specific listing. For example, suppose you

    want to view the changelog



$ rpm -q --changelog audit

               * Tue Jan 13 2009 Steve Grubb <sgr...@redhat. com> 1.7.11-2

               - Add crypto event definitions



* Sat Jan 10 2009 Steve Grubb <sgr...@redhat. com> 1.7.11-1

               - New upstream release



Or, maybe you want to see what scripts are installed.



$ rpm -q --scripts audit

               postinstall scriptlet (using /bin/sh):

               /sbin/chkconfig --add auditd

               preuninstall scriptlet (using /bin/sh):

               if [ $1 -eq 0 ]; then

                    /sbin/service auditd stop > /dev/null 2>&1

                    /sbin/chkconfig --del auditd

               fi

               postuninstall scriptlet (using /bin/sh):

               if [ $1 -ge 1 ]; then

                    /sbin/service auditd condrestart > /dev/null 2>&1 || :

               fi



For dependencies listing, use the "R" option.



$ rpm -qpR /iso0/Fedora/ RPMS/libpcap- 0.8.3-7.i386. rpm

               /sbin/ldconfig

               /sbin/ldconfig

               kernel >= 2.2.0

               libc.so.6

               libc.so.6(GLIBC_ 2.0)

               libc.so.6(GLIBC_ 2.1)

               libc.so.6(GLIBC_ 2.1.3)

               libc.so.6(GLIBC_ 2.3)

               openssl

               rpmlib(CompressedFi leNames) <= 3.0.4-1

               rpmlib(PayloadFiles HavePrefix) <= 4.0-1



To check the integrity, use the "-K" option.



$ rpm -K /iso0/Fedora/ RPMS/libpcap- 0.8.3-7.i386. rpm

               /iso0/Fedora/ RPMS/libpcap- 0.8.3-7.i386. rpm: (sha1) dsa sha1 
md5 gpg OK



To list all packages installed.



$ rpm -qa



To find out which file a package belongs to.



$ rpm -qf /usr/lib/libecpg. so.4.1



To find the source. (See Tip 246 for more detail)



$ rpm -qi sysstat



To uninstall a package



$ rpm -e



For building rpm packages reference the following:

       http://www-106. ibm.com/develope rworks/library/ l-rpm1/



To verify md5 sum so that you know it downloaded ok



$ rpm -K  *.rpm



The following is a good reference:

        http://www.redhat. com/docs/ books/max- rpm/max-rpm. pdf

        http://www.rpm. org/max-rpm/ s1-rpm-install- additional- options.html




 

      

    
    
        
         
        
        








        


        
        


      

[Non-text portions of this message have been removed]

Reply via email to