After install apache & mysql, they will be started automatically when you login. To prevent it, just do simple code
sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove
Saturday, May 23, 2009
Friday, February 13, 2009
some trick with ls command
i use ls command very frequently, and here are some tricks
1. list only directory:
1. list only directory:
- ls -l | grep “^d”
- find . -type d -maxdepth 1 -mindepth 1
- ls -d */
- find . -type f -maxdepth 1
- find . -type f -maxdepth 1 \( ! -iname ".*" \)
Friday, January 23, 2009
amazing with python (string)
developers = set(['tuan', 'chau', 'hung', 'hoang', 'hoan'])* find manager who coding
managers = set(['hoang', 'ngoc'])
managers & developers* find manager who not coding
managers - developers* find all
managers | developershappy coding
Friday, January 16, 2009
backup and restore mysql in ubuntu
although i use ubuntu with shell, you can use whatever linux's distribution, command should like the same
backup mysqlmysqldump -u [username] -p [password] [database'name] > [backup'sname]
exp: mysqldump -u root -p 123 mysite > mysite.bak.sql
restore from file backupmysql -u [username] -p [password] [database'name] < [backup'sname]
note that the only different is mysql <> mysqldump and > <> <exp: mysql -u root -p 123 mysite < mysite.bak.sql
click here for more details
happy coding!
backup mysqlmysqldump -u [username]
exp: mysqldump -u root -p 123 mysite > mysite.bak.sql
restore from file backupmysql
note that the only different is mysql <> mysqldump and >
click here for more details
happy coding!
Saturday, January 10, 2009
Subscribe to:
Posts (Atom)