Archives:

Convert a flac file into an mp3 file

On Ubuntu, install flac.

#apt-get install flac lame

Put the following script in /usr/bin/ and give it a name (convert_flac.sh or flac2mp3.sh)

#!/bin/bash  
FLAC=$1
MP3="${FLAC%.flac}.mp3"
[ -r "$FLAC" ] || { echo can not read file \"$FLAC\" >&1 ; exit 1 ; } ;
metaflac --export-tags-to=- "$FLAC" | sed 's/=\(.*\)/="\1"/' >tmp.tmp
cat tmp.tmp
. ./tmp.tmp
rm tmp.tmp


How to set the $LANG and $LC_ALL properly

How to view the current locale setting

# locale
LANG=en_US
LC_CTYPE= "en_US"
LC_NUMERIC= "en_US"
LC_TIME= "en_US"
LC_COLLATE= "en_US"
LC_MONETARY= "en_US"
LC_MESSAGES= "en_US"
LC_ALL=en_US

How to change the locale setting

To change the current locale setting, first confirm that the desired locale is
installed on the system with:



How to flush the postfix queue

For some reason Postfix sometimes get stuck.
To see if there are some email stuck in the queue you can simply type:

oktober# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
38A1BF3B1* 1152 Thu Feb 12 00:22:39 www-data@oktober.momeunier.fr
momeunier@gmail.com

-- 1 Kbytes in 1 Request.

Fortunately there is a little binary called postqueue that can help.