Technology Insights

How to Find Out Which Package Installs a Certain Command Using yum

To find out how to install a certain command or utility via yum you can use list or the “whatprovides” option as shown below.  

This is an example of using yum with the list option to find any packages with “send” in the name.

bash

  1. yum list *SEND*

Using this command will provide results like the below.

bash

  1. [root@server ~]# yum list *SEND*
  2. Loading "installonlyn" plugin
  3. Setting up repositories
  4. Reading repository metadata in from local files
  5. Available Packages
  6. mgetty-sendfax.x86_64 1.1.33-9.fc6 base
  7. nautilus-sendto.x86_64 0.7-5.fc6 base
  8. nautilus-sendto-bluetooth.x86_64 0.7-5.fc6 base
  9. perl-Email-Send.noarch 2.192-2.el5.rf rpmforge
  10. perl-Jabber-SimpleSend.noarch 0.03-1.el5.rf rpmforge
  11. perl-Mail-SendVarious.noarch 0.3-1.el5.rf rpmforge
  12. perl-Mail-Sender.noarch 0.8.16-1.el5.rf rpmforge
  13. perl-Mail-Sendmail.noarch 0.79-1.2.el5.rf rpmforge
  14. perl-Net-SenderBase.noarch 1.01-1.el5.rf rpmforge
  15. perl-X11-SendEvent.noarch 1.3-1.2.el5.rf rpmforge
  16. sendip.x86_64 2.5-2.el5.rf rpmforge
  17. sendmail.x86_64 8.13.8-2.el5 base
  18. sendmail-cf.x86_64 8.13.8-2.el5 base
  19. sendmail-devel.x86_64 8.13.8-2.el5 base
  20. sendmail-devel.i386 8.13.8-2.el5 base
  21. sendmail-doc.x86_64 8.13.8-2.el5 base

If you are unable to provide the command or utility you are looking for using the list option then try whatprovides as shown below when trying to install iostat.

Technology Insights

How to Check CPU Speed on Linux

The easiest way to check CPU speed and CPU model on Linux is to issue the below command from the CLI.

bash

  1. more /proc/cpuinfo | egrep 'model name|cpu MHz'

This will return results like the below that will list CPU model name on one line followed by CPU speed on the next line.

bash

  1. [root@server ~]# less /proc/cpuinfo | egrep 'model name|cpu MHz'
  2. model name : Dual-Core AMD Opteron(tm) Processor 2212
  3. cpu MHz : 2010.302
  4. model name : Dual-Core AMD Opteron(tm) Processor 2212
  5. cpu MHz : 2010.302
  6. model name : Dual-Core AMD Opteron(tm) Processor 2212
  7. cpu MHz : 2010.302
  8. model name : Dual-Core AMD Opteron(tm) Processor 2212
  9. cpu MHz : 2010.302

Technology Insights

Delete All Rows from a PostgreSQL Table

Use the truncate command from the CLI or via PGAdmin to delete all rows from a PostgreSQL database. To use PGAdmin follow the directions here or follow the directions below to truncate the table from the CLI. Connect: Connect to PostgreSQL with psql. Delete Rows: Type the following from the CLI. bash dev=# truncate table <em>table_name</em>…