find . -type d -print0 | xargs -0 chmod 0775 # For directories
find . -type f -print0 | xargs -0 chmod 0664 # For files
Entries tagged as ‘*nix’
chmod 755 for dir 644 for files
January 16, 2009 · 2 Comments
Default Gateway on Ubuntu
September 11, 2008 · 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
address 192.168.1.45
netmask 255.255.255.0
#gateway 192.168.1.1
gateway 192.168.1.254
broadcast 192.168.1.255
Colourful PS1 that still auto wraps
July 9, 2008 · Leave a Comment
export PS1="\u@\h\[\e[1;4;33m\][LIVE]\[\e[0m\]:\W$ "
\u@\h\
- user @ hostname
\[\e[1;4;33m\]
- 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 “;”
\[\e[0m\]
- 0 resets to normal display
\W
- working directory
tar gzip several files into a single archive
September 11, 2007 · 1 Comment
from http://www.gzip.org/#faq7
for GNU tar: gtar cvzf file.tar.gz filenames
for any tar: tar cvf - filenames | gzip > file.tar.gz
using apt-get in Ubuntu …
January 30, 2007 · 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 !!








