How to reduce the size of mp3 files

Do the install of lame program

sudo apt-get install lame -y

Try it now

lame --mp3input -b 32 input.mp3 output.mp3

The size of ~5M will be decreased to ~900K

Its pretty good if you don't need a good qulity of your media

For bulk mp3 converts login your media folder and run:

for i in `ls |grep -i mp3`; do lame --mp3input -b 32 "$i" ./output/$i;
Read the rest

Xubuntu shortcuts configuration file location

The configured keyboard shortcuts are stored in :


cat /home/username/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml |grep -i lock


<property name="&lt;Super&gt;l" type="string" value="xflock4"/>… Read the rest

How to repair Boot loader Grub

Boot your computer from a Live USB/CD/DVD

Note: only use a Live USB/CD/DVD of the Ubuntu version that you wish to repair.

However I've used Xubuntu 12.04 to repair 14.04 version

Find a root partition where your Ubuntu is installed

sudo fdisk -l

sudo parted -l

Run the following command into your teminal

sudo mount /dev/sdaX /mnt

Where X is number of partition where your Ubuntu is installed

For example:

sudo mount /dev/sda1 /mnt

This mounts the Ubuntu root partition on the hard drive

Run the following command to install Grub

sudo grub-install /dev/sda --root-directory=/mnt


Reboot your machine

sudo reboot

You should see now grub menu now with your installation, so just login your Ubuntu now and run the following:

sudo update-grub

It will update your grub if you have other OS installed

sudo reboot

Done!… Read the rest

How to reset forgotten mysql root password

Login server as root and stop/kill mysql processes

Start mysql server with skip-grant-tables

mysqld_safe --skip-grant-tables


use mysql;
update user set Password=PASSWORD('new-password') where user='root';
flush privileges;


Now kill mysql processes and restart your mysql server… Read the rest

How to disable/enable all wordpress plugin via mysql/shell command lines

In order to view active plugins run:

use database;
SELECT * FROM wp_options WHERE option_name = "active_plugins";

From shell command line

mysql --host=localhost --user=database_user --password=dbpassword database -e 'SELECT * FROM wp_options WHERE option_name = "active_plugins";'

Save active plugins to file

mysql --host=localhost --user=database_user --password=dbpassword database -e 'SELECT * FROM wp_options WHERE option_name = "active_plugins";' |grep active_plugins |awk '{print $3}' > active_plugins.txt
Read the rest

How to move a running process to a screen

We need additional software to do this

We have to choose between reptyr and retty. As retty works for x86 linux system only, so we are going to use reptyr

Go ahead and install it:

$sudo apt-get install reptyr -y

For Centos you can get it here:

wget the rest

How to dealing with jobs

If you have started a huge process and just remember that you've forget do it in screen session, you may try to move this process to the background. You can do this by pressing ctrl+z keys, which will temporary block this process and then run bg, here is example:

We've run maldet command

$maldet -a ./Read the rest