ABHIONLINUX
Site useful for linux administration and web hosting

2011/04/25

/bin/mv: Argument list too long

When you are trying to move large number of files such 200000 files. you can use the command

mv  * /path/to/move

If you try the above command, you will be getting the error  "/bin/mv: Argument list too long"


You can use the command given below to avoid this error ,


find /path/to/file -type f | xargs -i mv "{}" /path/to/move


Try this out.. :)

2011/04/19

FFmpeg :: make: *** [ffmpeg_frame.lo] Error 1/

Sometimes you will get the error given below when installing ffmpeg-php in your server.
FFmpeg :: make: *** [ffmpeg_frame.lo] Error 1


Fix:
modify the file ffmpeg_frame.c and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32


Now run make and make install


Eg: 
  • vi ffmpeg_frame.c
  • :%s/PIX_FMT_RGBA32/PIX_FMT_RGB32
  • :wq!

Another method is 
  • cd /path/to/ffmpeg-php-0.6.0
  • cp -aP ffmpeg_frame.loT ffmpeg_frame.lo
  • make clean
  • ./configure

How to install yasm

You can follow the steps given below to install yasm from source.


# wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.0.tar.gz
# tar zfvx yasm-0.7.0.tar.gz
# cd yasm-0.7.0
#  ./configure
# make 
# make install
You can check the yasm binary using the command
# which yasm
/usr/local/bin/yasm

How to install Yamdi

You can follow the steps given below to install Yamdi

cd /usr/local/src/
wget http://downloads.sourceforge.net/project/yamdi/yamdi/1.4/yamdi-1.4.tar.gz?use_mirror=ufpr
tar zxf yamdi-1.4.tar.gz
cd yamdi-1.4
gcc yamdi.c -o yamdi -O2 -Wall
mv yamdi /usr/bin/
yamdi -h



You can check the yamdi binary using "which yamdi'

2011/04/09

How to install qt-faststart with ffmpeg


You can follow the steps given below to install qt-ffmpeg with ffmpeg. For this steps to work out, you should have a working ffmpeg installation in your server.

# svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
# cd ffmpeg
# ./configure
# make
#make tools/qt-faststart
#cp -a tools/qt-faststart /usr/bin/




2011/04/04

Spool file is locked (another process is handling this message) : Unable to send emails ,exim




There are many resons for this error. They may be due to dns, firewall.

Please try the fix given below.

#cd /var/spool/exim4/db
# mv * /backup
move all the files to a backup folder

#/etc/init.d/exim restart

This should fix the issue. If this doesnt fix the issue, please try by restarting the firewall. Firewall may be blocking your emails.

How to enable IP rotation in exim.


If your server are having multiple IP and you want to send each emails in different IP address. You can follow the steps given below. This is used to maintain the ip reputation. While doing this, please make sure that this is not used for spamming.

Open you exim config,

vi  /etc/exim.conf

search for the line : interface =

replace this line with
interface = 192.168.0.1${eval:${substr{-2}{1}{$tod_zulu}}%7+1}

If your server is having ip's from 192.168.0.11 to 192.168.0.20 , you can use above line.
+1 is  is the starting ip ie  192.168.0.1'1'
%9 is the incriment value ie 11(192.168.0.11) to how much. here it is 20 (192.168.0.20)