Wednesday, May 15, 2013

How to remove kernels from previous release?

Open terminal and check your current kernel:

uname -r

Next, type the command below to view / list all installed kernels on your system.

dpkg --list | grep linux-image
Find all the kernels that lower than your current kernel. When you know which kernel to remove, continue below to remove it. Run the commands below to remove the kernel you selected.

sudo apt-get purge linux-image-x.x.x.x-generic
sudo apt-get purge linux-image-3.2.0-3{0..5}-generic

Finally, run the commands below to update grub2

sudo update-grub2
Reboot your system.

Saturday, May 04, 2013

sendemail: invalid SSL_version specified at /usr/share/perl5/IO/Socket/ line 332

sudo aptitude install sendemail

sudo aptitude install libio-socket-ssl-perl

sendEmail -f -t -u Teste_Assunto -m Teste_Corpo -s -xu xxx_conta -xp xxx_senha -o tls=yes

if you have this error:
invalid SSL_version specified at /usr/share/perl5/IO/Socket/

The SSL_version is being coded as "SSLv3 TLSv1" and the regular expression is failing. I hacked it as a workaround as follows... change:

That did the trick for me.

Apagar ficheiros duplicados

sudo aptitute install fdupes
fdupes -r /home > dupes.txt
fdupes -r -d /home

How to get the IP address of the docker host from inside a docker container

/sbin/ip route|awk '/default/ { print $3 }'