Install Skype in Fedora 14 (64 bits)

Since Skype doesn’t provide a 64 bits version, we can use the 32 bits version if we are using a Fedora of 64 bits.

1. Install the i686 pre-requisite packages.

yum -y install pulseaudio-libs.i686 pulseaudio-libs-devel.i686 alsa-plugins-pulseaudio.i686 libv4l.i686   libXv.i686 libXv-devel.i686 libXScrnSaver.i686  libXScrnSaver-devel.i686 dbus-qt.i686 dbus-qt-devel.i686 qt.i686 qt-devel.i686

2. Download Skype i586 (fedora 10+)

wget http://download.skype.com/linux/skype-2.1.0.81-fc10.i586.rpm

3. Install Skype

yum -y localinstall skype-2.1.0.81-fc10.i586.rpm --nogpgcheck

We can now run our new Skype Installation.

Export data to CSV in PostgreSQL

PostgreSQL provides an easy way to export our query result into a CSV file, let’s see how we can do this.

1. Let’s connect to PostgreSQL with psql command:

user@host:~$ psql -p 5433 -U dba dbname

2) Type \o /home/user/data.csv, it will export the query result to /home/user/data.csv file.

dbname=> \o /home/user/data.csv

3) Type query that you want to export

dbname=> select * from table;

Now we should have our data.cvs file with all the query result.

4. Quit the psql command.

dbname=> \q

I hope this works for you.

Delete email from queue

Delete emails from queue If you have an email that is not being send and you want to remove it from the spool queue:

as root:

#mailq

This command will give us a list of emails request.

Example:

[root@-- --]# mailq
		/var/spool/mqueue (3 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
p19HouGC017719       84 Wed Feb  9 11:50
                 (Deferred: Connection refused by mail.somewhere.xxx.)

p19HgMTg017374       84 Wed Feb  9 11:42
                 (Deferred: Connection refused by mail.somewhere.xxx.)

p19Hui1W018001       84 Wed Feb  9 11:56
                 (Deferred: Connection refused by mail.somewhere.xxx.)

		Total requests: 3

As we can see, we currently have 3 emails that are not being send.

Each email is store in:

/var/spool/mqueue
[root@-- --]# ll /var/spool/mqueue/
total 6
-rw-------. 1 root smmsp   84 feb  9 11:42 dfp19HgMTg017374
-rw-------. 1 root smmsp   84 feb  9 11:50 dfp19HouGC017719
-rw-------. 1 root smmsp   84 feb  9 11:56 dfp19Hui1W018001
-rw-------. 1 root smmsp  928 feb  9 13:22 qfp19HgMTg017374
-rw-------. 1 root smmsp  927 feb  9 13:22 qfp19HouGC017719
-rw-------. 1 root smmsp  928 feb  9 13:22 qfp19Hui1W018001

For each email, we have 2 files.

Example:

For the email with ID: p19HouGC017719, we have two files:

1. dfp19HouGC017719
2. qfp19HouGC017719

So we just need to delete these two files to cancel this email.

[root@-- --]#rm dfp19HouGC017719 qfp19HouGC017719

That’s it. We can recheck with mailq:

[root@-- --]# mailq
		/var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
p19HgMTg017374       84 Wed Feb  9 11:42
                 (Deferred: Connection refused by mail.somewhere.xxx.)

p19Hui1W018001       84 Wed Feb  9 11:56
                 (Deferred: Connection refused by mail.somewhere.xxx.)

		Total requests: 2

Now our email is gone.