Search This Blog

Showing posts with label command line. Show all posts
Showing posts with label command line. Show all posts

Monday, December 24, 2012

Unix Command file removal recursive


      I have a project checked out from svn a while ago and wanted to revisit the project, but i realized that instead of using svn export i did a svn checkout so the annoying .svn folders where everywhere. Here is the command to remove them recursively.
Before we issue any kind of rm -rf command lets be safe and list all the .svn folders.
$ find . -type d -name .svn


Then we remove those suckers. 
$ find . -type d -name .svn | xargs rm -rf

Sunday, December 25, 2011

PostgreSql change password command line


Awww yeah... If we can't remember your postgres db password, we can reset it.

Ubuntu
First we have to switch to postgres user


su - postgres


now we can execute the psql command


psql -d dbname -U postgres; (this allows you to get it o the db)


alter user postgres with password 'newpassword'; (now you can modify the password)