Techno Thoughts!  Subscribe

Author Archive

Cloning a Virtualbox VDI Disk Image (and changing the UUID)

by admin on Jul.26, 2010, under Software

If you use VirtualBox and try to copy/clone a hard disk (VDI) file to use with another virtual machine, it will not let you add it because it complains that there is already an image with that UUID.

Fortunately the fix is simple - there is a hidden command available to generate a new UUID:

VBoxManage internalcommands setvdiuuid myfile.vdi

Leave a Comment :, more...

Recursively chmod Files and Directories

by admin on Jun.03, 2010, under Linux

To recursively chmod all files in the current directory (and sub-directories), you can do this:

find . -type d -exec chmod 755 {} \;

To do the same with just files, you can use:

find . -type f -exec chmod 644 {} \;

Leave a Comment :, , more...

Changing Prompt and xterm Title in Bash

by admin on May.12, 2010, under Linux

It’s really useful to not only be able to see the user and directory in your prompt but to have different colours for different users/servers - like a different colour for root or production boxes. Here is the code I use - just put it in a .profile in the users’s home directory (or in /etc/profile for globally):

# Set xterm title:
SHOSTNAME=`hostname -s`
PROMPT_COMMAND='if [ "${TERM}" = "xterm" -o "${TERM}" = "xterm-color" ];
then
   if [ -n "${XTITLE}" ];
   then
      echo -ne "\033]0;${XTITLE}\007";
   else
      echo -ne "\033]0;[${USER}@${SHOSTNAME}:${PWD}]\007" | sed -e "s@${HOME}@\~@";
   fi;
fi'    

# Set Bash Prompt:
if [ "$BASH" ]; then
  PS1='\[\033[1;36m\][\u@\h:\w]\$\[\033[0m\] '
#  alias ls='ls --color'
else
  if [ "`id -u`" -eq 0 ]; then
    PS1='# '
  else
    PS1='$ '
  fi
fi  

export PS1 PROMPT_COMMAND SHOSTNAME

You can change the colours using the following codes:

# Black       0;30     Dark Gray     1;30
# Blue        0;34     Light Blue    1;34
# Green       0;32     Light Green   1;32
# Cyan        0;36     Light Cyan    1;36
# Red         0;31     Light Red     1;31
# Purple      0;35     Light Purple  1;35
# Brown       0;33     Yellow        1;33
# Light Gray  0;37     White         1;37

Leave a Comment :, , , more...

Must Try Harder!

by admin on Mar.15, 2009, under Ian Chilton

Welcome to my blog!

I am a 29 year old, senior web developer, technical project manager, UNIX system administrator, Linux user, programmer, husband, father (of 2), God follower (born again Christian) and all round technical….ehm, geek really. However, i’ve never really got into the whole blogging thing. I did install Wordpress once a few years ago but never really found the time or motivation to post anything (although in reality it was just lazyness as it doesn’t really take long to drop in a short post here and there when interesting things happen!).

So, here we go again - i’m really going to try this time!

I’m going to use this place as somewhere I can share interesting thoughts, findings or things i’ve been doing/working on. In part it will be somewhere I can refer back to myself when I want to try and remember how I did something or where I found somthing, but also a place that other people might stumble on and find some useful information here and there.

If you have actually found this blog and are reading it - enjoy the ride!

Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...