Category Archives : Sys admin


Escape asterisk * in file when cat -ing it in ksh

If you were to want to read the contents of a file in ksh, and the file just so happens to contain problematic characters like *, do this in your script: set -f prior to doing: sql=`cat $sql_file`;   More info (from http://www.computing.net/answers/unix/escaping-in-korn-shell/7016.html): echo $- ism set -f echo $- isfm echo $sample test* set +f […]


Playing Real Media files with KMPlayer on Windows 7 64bit

Traditionally I needed real player 10 to get it to work.  But that is too old to be installed on windows 7 64bit.  Thus, I had to install real alternative and k-lite and stuff. Per k-lite (http://www.codecguide.com/faq_playback_issues.htm#item32): You are missing a decoder for RealAudio COOK. You can install that by following these steps: Download the […]


Nutch: setup tomcat

After building war file for nutch with: ant war Put nutch-*.war  and nutch.xml into /opt/tomcat/apache-tomcat-7.0.12/webapps Restart tomcat and it will expand war file automatically. I also created softlink in /opt/tomcat/apache-tomcat-7.0.12/conf/Catalina/localhost/nutch.xml to point to /opt/tomcat/apache-tomcat-7.0.12/webapps/nutch.xml  Don’t know if it’s necessary.  Once you create this you’ll have to restart tomcat. Edit nutch.xml to tell it where index is […]


Setting up Nutch: war file

You need to build war file with: ant war However, you may get: java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison Your ant may not be installed right. Just download binaries (not use yum) from ant.apache.org set classpath to the jars within, e.g. export CLASSPATH=/opt/ant/apache-ant-1.8.2/lib/ant-antlr.jar:/opt/ant/apache-ant-1.8.2/li b/ant-apache-bcel.jar:/opt/ant/apache-ant-1.8.2/lib/ant-apache-bsf.jar:/opt/ant/apache-an t-1.8.2/lib/ant-apache-log4j.jar:/opt/ant/apache-ant-1.8.2/lib/ant-apache-oro.jar:/opt/an t/apache-ant-1.8.2/lib/ant-apache-regexp.jar:/opt/ant/apache-ant-1.8.2/lib/ant-apache-res olver.jar:/opt/ant/apache-ant-1.8.2/lib/ant-apache-xalan2.jar:/opt/ant/apache-ant-1.8.2/l ib/ant-commons-logging.jar:/opt/ant/apache-ant-1.8.2/lib/ant-commons-net.jar:/opt/ant/apa che-ant-1.8.2/lib/ant-jai.jar:/opt/ant/apache-ant-1.8.2/lib/ant-javamail.jar:/opt/ant/apa che-ant-1.8.2/lib/ant-jdepend.jar:/opt/ant/apache-ant-1.8.2/lib/ant-jmf.jar:/opt/ant/apac he-ant-1.8.2/lib/ant-jsch.jar:/opt/ant/apache-ant-1.8.2/lib/ant-junit4.jar:/opt/ant/apach e-ant-1.8.2/lib/ant-junit.jar:/opt/ant/apache-ant-1.8.2/lib/ant-launcher.jar:/opt/ant/apa che-ant-1.8.2/lib/ant-netrexx.jar:/opt/ant/apache-ant-1.8.2/lib/ant-swing.jar:/opt/ant/ap ache-ant-1.8.2/lib/ant-testutil.jar:$CLASSPATH AND make sure ANT_HOME is […]


Cron stopped working on solaris

Check if cron is running, if so, check /var/cron/log If it says: ! c queue max run limit reached Sat May  7 21:15:00 2011 ! rescheduling a cron job Sat May  7 21:15:00 2011 ! c queue max run limit reached Sat May  7 21:16:00 2011 ! rescheduling a cron job Sat May  7 21:16:00 […]