Installing PostgreSQL in Ubuntu

sudo apt-get install postgresql
sudo apt-get install pgadmin3

Now basic postgres server and gui client tool is installed

Let’s login to default user ‘postgres’ and add a password, Enter this command –

sudo -u postgres psql postgres

You get the psql command prompt and enter this command to add password for user ‘postgres’

postgres=# \password postgres

Then Ctrl + D to exit the postgres console

 

For additional contrib package

sudo apt-get install postgresql-contrib-9.1

Delete .svn directories in Linux

If you are using svn in Linux + Eclipse, you might encounter this problem. There will be lot of hidden .svn directories created in each folder. This should be cleaned if you’re going to commit this as a separate project.

Enter this command in the home directory of the project

rm -rf `find . -type d -name .svn`

Or create a bash script as follows and save this as /usr/bin/csvn

#!/bin/sh
echo "recursively removing .svn folders from"
pwd
rm -rf `find . -type d -name .svn`

Now calling csvn command in any project directory will recursively delete the .svn directories under that.

Remember you’ll have to modify file permissions – for the script to become executable.