Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts

Sunday, August 5, 2007

MySQL

I have configured the mysql data directory to /mnt/mysql_db

You can immediately start insert to the database. It will automatically stored in the mnt folder

To install mysql
type : yum install mysql php-mysql mysql-server

To find config file
whereis my.cnf

To modify data directory
Edit my.cnf

To check disk space
use : df or du

Thursday, August 2, 2007

Float number handling in Shell

I was having hard time using float number in shell programming.
Shell treat any number with . as a string. Then I got a trick to use bc ( binary calculator):

Usage:
num="echo $strnum | bc"

Tuesday, July 31, 2007

Usng AWK

To get field 5 values
ls | awk '{ print $5 }'