chmod 755 for dir 644 for files


find . -type d -print0 | xargs -0 chmod 0775 # For directories
find . -type f -print0 | xargs -0 chmod 0664 # For files

Default Gateway on Ubuntu

Leave a comment

josh@wombat:/etc/network$ more interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

## Network interface(s)
## You should (un)comment and edit according to your needs.

# The primary network interface (dhcp)
#auto eth0
#iface eth0 inet dhcp

# The primary network interface (static IP)
auto eth0
iface eth0 inet static

Colourful PS1 that still auto wraps

Leave a comment

export PS1="\u@\h\[\e[1;4;33m\][LIVE]\[\e[0m\]:\W$ "


  • user @ hostname


  • enclosing “\[” and “\]” – to /not/ confuse the screen mode so that auto wrapping is preserved.
  • “\e” – is the escape, you could use “33” too
  • “1;4;33” – “1” is for “bold”, “4” is for “underline”, and “33” is for “yellow”, you can add background colour by adding the ascii code for background colour – just separate these numbers with “;”


  • 0 resets to normal display


  • working directory

find and delete

Leave a comment

find . -name ".svn" -exec rm -rf {} \;

tar gzip several files into a single archive



for GNU tar: gtar cvzf file.tar.gz filenames
for any tar: tar cvf - filenames | gzip > file.tar.gz

using apt-get in Ubuntu …

Leave a comment

I downloaded a vm appliance – ubuntu edgy server – by Joao InacioI (Thanks mate!) and it was quick and easy. But it did not come with openssh-server (sshd) where I can ssh into… *sigh* so here what i had to go through to get it.

sudo apt-get install openssh-server

But it didn’t work : “Package not available… But referred to by another package” … after googling around, I realised it was becasue the had to include the universe repository which apt-get depends on.

sudo vi /etc/apt/source.list

follow the comments in that file, I basically uncommented the last 2 lines.

sudo apt-get update

this will do and update

sudo apt-get install openssh-server

this thime it works !!