10/29/2013

Create multiple subdirectories in one command by mkdir

Usually, you may want to create more subdirectories by one command, e.g.
mkdir /var/www/aa/bbb/ccc/dddd
if directory aa does not exist, you can not create.
So you should use
mkdir /var/www/aa
mkdir /var/www/bbb
....


It is terrible by these commands. Of course, you may use one command to complete it
mkdir -p /var/www/aa/bbb/ccc/dddd

It is simple.  Another, if you want to create new directories
/var/www/aa/bbb/ccc/dddd
/var/www/aaa/bbb/ccc/dddd
/var/www/aaaa/bbb/ccc/dddd

You may use these command to complete. But there is one another command to complete based on regular form {}.

mkdir - p /var/www/{aa,aaa,aaaa}/bbb/ccc/dddd

It is nice. Good luck to you.

10/16/2013

Mysql clear screen

You may use the following command to clear screen on mysql command

system clear;