Create a Subdomain in Apache2

August 27, 2013

Let’s say you have a domain and you want to add a subdomain Here’s how to do it.

Create an apache config file:

touch /etc/apache2/site-available/
vi /etc/apache2/site-available/

Linux Screen Tutorial

August 23, 2013

Screen is a Linux tool to run multiple virtual terminal from a command line. It is useful when you need to run long processes and you need to close your SSH client. Screen is really life saver.


Start a new Screen

$ screen

Remove Empty Directories Recursively in Linux

July 9, 2013

find . -type d -empty -delete

Remove Files Recursively in Linux

July 9, 2013

Do you ever try rm -r *.bak and wonder why it is not working like it is supposed to? From the man page (man rm), the definition for -r is :

r, -R, --recursive
              remove directories and their contents recursively

Simple String Replacement Tool in Linux

June 24, 2013

First install mysql client (replace utility is one of a tool in MySQL package).

apt-get install mysql-client