Page 139 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 139

Unit 7: Installing Software




          The -q switch is used to query packages. By itself, -q will give you the version of a specified   notes
          package. If you want to see which version of the tin newsreader you have on your system, you
          would issue the following command:

          # rpm -q tin
          tin-1.22-12
          If you want to see which installed package owns a file, use the -f modifier. Here, we want to see
          which package owns /etc/passwd.

          # rpm -q -f /etc/passwd
          setup-1.9.2-1
          Likewise,  if  you  want  to  generate  a  list  of  files  belonging  to  a  certain  package,  use  the  -l
          modifier:
          # rpm -q -l tin
          /usr/bin/rtin
          /usr/bin/tin
          /usr/doc/tin-1.22

          /usr/doc/tin-1.22/CHANGES
          /usr/doc/tin-1.22/FTP
          /usr/doc/tin-1.22/HACKERS
          /usr/doc/tin-1.22/INSTALL
          /usr/doc/tin-1.22/INSTALL.NNTP
          /usr/doc/tin-1.22/MANIFEST
          /usr/doc/tin-1.22/README
          /usr/doc/tin-1.22/TODO
          /usr/man/man1/tin.1
          One of the most common modifiers to -q is -a, query all packages on your system. This system has
          350 packages installed, but here’s a truncated output:

          # rpm -q -a
          setup-1.9.2-1
          filesystem-1.3.2-3
          basesystem-4.9-3
          ldconfig-1.9.5-8
          ...
          code_crusader-1.1.0-1
          lyx-0.11.53-1
          xforms-0.86-1
          wine-981211-1
          Listing 1
          For even more information about a package, use the -i (information) modifier:

          # rpm -q -i passwd




                                           LoveLy professionaL university                                   133
   134   135   136   137   138   139   140   141   142   143   144