admin on March 31st, 2009

If you want to edit a bunch of files – for dns updates on bind for example, do this:
sed –i s/<text to replace>/<text to replace with>/g filename_to_change

If you’re concerned about backups, then you can do this:
sed –i’<orginal backup file extension>’ s/<text to replace>/<replacement text>/g filename_to_change
e.g. if we want to edit a file and keep the [...]

Continue reading about Editing files in place with sed

admin on March 25th, 2009

Rsync beats using SCP if you’re trying to copy files from one directory/machine to another. Definitely use rsync if you already have a partial copy and want to copy only new/changed files. This will save you having to copy any files that already exist and are the same.
E.g.
rsync -avz user1@machine1.fqdn:/source/directory/with/all/the/files/* /target/directory/
The -avz options are [...]

Continue reading about Rsync usage and ‘Argument list too long’ error

This is a simple way to get an email from a *nix command line that will test that emails can be sent. I’ve also set it up so that it tells you the name of the user who sent the email and the machine from which it was sent. The time and date is so [...]

Continue reading about How to test email from the command line on a *nix machine

admin on March 13th, 2009

If you’re using NAT on your virtual machines, you can make the guest O/S services accessible from the host O/S by doing port forwarding. Obviously, this means that the guest O/S can be accessed by anything on the network which may be good or bad depending on your environment.
Anyway, here’s the excerpt from the VirtualBox [...]

Continue reading about Adding port forwarding in VirtualBox

admin on March 13th, 2009

There are, apparently, two ways to create a clone of the Virtualbox drives. The ‘right’ way and the ‘wrong’ way.
The right way is to use the following:
VBoxManage clonehd <filename> <outputfile>
You can optionally use the UUID as the input filename.
Anyway, the ‘wrong’ way to do it is to make a copy of the .vdi file in [...]

Continue reading about VirtualBox clone Hard drive

admin on March 10th, 2009

A couple of gotcha’s here…
If you get an error saying that OC4J configuration issue <blah blah instance> not found (often TSH1),  check the ORACLE_SID variable to make sure it’s correct. The ‘$ORACLE_HOME/bin/emctl start dbconsole’ command should now work. Check this by looking at http://servername/1158/em (by default)
The other one is that when you start the Enterprise [...]

Continue reading about Oracle Enterprise manager