Thursday, 27 June 2013

Install flite (festival lite) text to speech system in linux

Flite is text to speech engine for linux. It is based on festival speech synthesis system. Most of the linux sytems comes with flite in its package manager. It's just a apt-get on debian based or yum install in rpm based systems.

For example, you can install it on centos with below command:

Sunday, 23 June 2013

How to download files recursively using wget as ftp client

I like to use rsync for scp for transferring files from another server whenever possible. But sometimes, we will be limited to use ftp for the same task due to different ssh port than the standard 22 as scp and rsync uses ssh.

Downloading each file separately one after another is tedious task than recursively download them. We can use wget with ftp protocol for recursively downloading files from another server. We will find out how to do this below.

How to autostart dropbox linux client daemon at server reboot

We have seen the script to start dropbox linux client daemon to start automatically if it is getting killed before. But how to autostart the client at server reboot?

As usual we can add the script to cronjob to take care of this. We will find this how below.

Script to check whether dropbox (dropboxd daemon) is running in linux server using command line

Now a days more people are using dropbox for backup in linux servers. Dropbox is a great product which has their client in all major platforms. So this is really ideal for using in linux servers too.

Dropbox runs dropboxd daemon in the server to check for updates and syncing the contents between its clients across different platforms. Sometimes this daemon will get killed and our backup process will be in jeopardy.

Saturday, 8 June 2013

Delete all iptables rules in linux

We have seen how to remove a particular IP from the iptables rule. Now what if we want to remove all the iptables rule?

We can use the below command to remove all iptables rule.

How to remove a rule from iptables

I want to remove a rule from iptables which used to block one of the IPs to and from the server. How can I remove it? We will find it below.

IP which is blocked: 123.456.78.90


This will basically cut off all the tcp communication from and to my server for the IP 123.456.78.90

Thursday, 6 June 2013

How to install go language tools in ubuntu

In the latest version of Ubuntu, the go language tools may be already available in the repos. In that case try,

   sudo apt-get install golang

If it is not working, add go tools PPA and install it.

Wednesday, 5 June 2013

How to run a golang program

Go is a language developed at google. The golang programs are generally having the extension '.go'.

So this is how we run a golang program.

How to run bash script in debug mode

Running the bash script in debug mode help us understand what is going on in the script before getting the output. This also help us find why our program didn't run if there is any issue.

It is just like step by step processing of the bash program.

We can use the below command to run the bash script in debug mode in run time.

How to format golang code

Golang is a language developed at Google. More information can be found at the wikipedia page.

Go has an easy tool called gofmt  to format the code blocks of go program in easy readable format.

Here is the command to format the golang program using gofmt   and save it to the corresponding file.