April 2010
M T W T F S S
« Mar   May »
 1234
567891011
12131415161718
19202122232425
2627282930  
  1. We welcome any feedback, questions or comments

How do I remove older backup automatically both for Linux and Windows

This is really helpful to Sys-Admin who is managing various backup on different geographical locations.

For Linux,

The following commands will help you to remove your old backup which cost disk usage. I used this script to remove the older backup using a cronjob.

[root@ip-8-11-50-231 database]# crontab -l 00 04 1,16 * * /usr/bin/find [...]

How do I add route on Mac OS or Disable internet on MaC for testing offline application

I have created two scripts which is added on sudo list. One is for removing default gateway and another one is adding the gateway.

1. # vi en_web.sh and add the following line /sbin/route add -net 0.0.0.0/0 192.168.0.9 2. vi dis_web.sh and add the following lines /sbin/route delete -net 0.0.0.0/0

3. Add the sudo entry [...]

MySQL : Passwordless root login

How do I skip asking mysql root password every time I logged as system “root” account ?

1. Create a “.my.cnf” in root user home directory. 2. add the following entry on it and save and quit.

[client] user=”root” pass=”HdfH8%KS9s”

3. Change the file permission to 700.

[root@rc-040 ~vi ~/.my.cnf <code>[root@rc-040 ~]# chmod 700 .my.cnf [...]

Mysql replication : on Centos

Here I’m going to replicate a database on the master DB server to a slave server.

On Master DB server,

1. Identify the database to be synchronized. 2. Edit /etc/my.cnf in between [mysqld].

log-bin=/var/log/mysql/mysql-bin.log binlog-do-db=securedb server-id=1 Then restart the mysql daemon, #service mysqld restart make sure that the file is created automatically and owned by [...]

How do I remove the password from protected pdf file ?

Here is the steps,

#yum install install xpdf-utils

1. Save the pdf to password less ps file

<strong>[root@rc-090 pdf-conv]# pdftops -upw 6546sant2006 secure.pdf</strong>

2. Build the pdf from ps file

[root@rc-090 pdf-conv]# ps2pdf secure.ps

You can see a secure.pdf on the same place where this command executed.

MySQL : Forgot root password

Here is the steps to re-set the forgot password on MySQL

1.

mysqld_safe –skip-grant-tables &

This command will start the mysql service wihtout looking on the privileges assigned for DB/Users. So anyone can login to this server. But you can’t execute any command against the ‘mysql”database.

2. Log to Mysql console and use [...]