Flush Memcached

Memcached can be flushed by firing the following command echo ‘flush_all’ | nc localhost 11211 This needs ‘nc’ to be installed. nc can be installed on ubuntu by the command ‘sudo apt-get install nc’ In case nc cannot be installed, another way to flush memcache is to use telnet. type in telnet localhost 11211 Once … Read more

tail a file that is recreated

tail -f –follow=name –retry fie This will tail a file even if the file is recreated. Typical use includes tailing a log file that is rolled over. (e.g. apache logs)

kill all processes with a specific string in its name

kill $(ps aux | grep “java” | grep -v ‘grep’ | awk ‘{print $2}’) kills all java processes. grep -v ‘grep’ ignores the current grep command If you need to give them a chance to gracefully shut down first then do this pids=”$(ps -C “java” -o pid,bsdstart | fgrep -v “:” | awk ‘{print $1}’)” … Read more

Removing Duplicate Photos

I went on a trip to Singapore recently and took around 500 photographs. I am not very good behind a camera, so i just got trigger happy and clicked whatever i could. After coming back i transferred the photographs to my laptop and started organizing them. I had some photos in my cell phone, some … Read more

Merge Shapefile polygons using Quantum GIS

This article looks at how to merge shapefile polygons using Quantum GIS. you can download Quantum GIS from Here. We demonstrate the merging using an example. We have a France shapefile that shows all the regions in France. We want to merge all the regions and create a single shapefile for France. Here are the … Read more