linux file structure

October 3rd, 2007

A picture is worth a 1000 words and all that.  For those wrestling with where unix/linux files are stored on your machine, a simple diagram from geek2live explains all.

Linux file structure Click on the picture for a closer look.

Personally this is a bit ”under the bonnet” for me.  So far with edubuntu been quite happy to let it sort out which files go where. Certainly haven’t had to chase anything!

managing timezones with PHP and Javascript

December 6th, 2006

This article describes the approach we took in a recent project to track activities across multiple timezones. It combines Javascript and PHP code to allow us to record activities and then display their times according to the location of the current user.

Read more…

Fixing MS Word Bloat

November 2nd, 2006

Sorry. There are more reasons for file bloat in MS Word than we can possible manage. So this article will focus on just one that we tend to run into regularly.

Problem we had was when writing training materials and including images of overheads. We’re firm fans of the “Send to MS Word” option in Powerpoint. This gives great looking pictures of each slide that you can just drag and drop into your document. However what tends to happen is after you’ve dragged a few into the document the file size suddenly jumps from something reasonable (for MS Word!) to a behomoth; we were regularly having to manage files of 50+ megs.

But after suffering one more time, found a solution at University of Queensland. And it worked like a charm.

Issue is that the “Send to Word” option does not create images of each slide but instead creates individual Powerpoint objects. Solution is to convert each slide object to an image:

  1. select the object - just click on it
  2. press CTRL+SHIFT+F9

To fix the whole document in one swoop, simply select everything (CTRL+A) before entering the special shortcut code above.

osx backup - the easy way

October 16th, 2006

After a few weeks of research I’ve finally put together a backup routine for my powerbook that works. For the first time for a long time I’m actually taking backups.

superduperI use SuperDuper to clone my entire hard disk to a removable USB drive whenever I remember to plug it in. Here’s the path of pain that led me to this straightforward solution.

Initially I tried to use rysnc. I really did. I mean what could be better than delving into archaic unix command lines. A few articles (this one, this one or this very detailed one) helped pave the way but where it all fell over was in packaging the required commands into a one-click wonder. Using Automator seemed hit and miss; I’d find one rsync command would fail via Automator but when cut&paste into terminal would work fine. I did however like the trick of using iCal to schedule tasks. That bit worked, pity the command didn’t.

Have since heard from Arnan de Gans who tried the same and pursued it a little further than I did. Apparently the solution for rsync was to get a new compile of it. More information and a sample are published at sothq.net.

I tried to use a few backup programs (iBackup, Retrospect, Carbon Copy Cloner,..). These worked OK but always a concern that the output was some non-standard format that may or may not be useful when needing to restore. And would be some work when needing to in any case.

So after all that faffing around I came to some key conclusions about my backup preferences:

  • If I need to use my backup I just want to use it - not unpack, assemble or otherwise “run it” to get my data back

    The whole point of a backup is to get the data back, be it the one file I accidentally erased or my life installed on a new machine because my battery exploded. And whenever either of those situations arises I don’t want to have to run some other application (so download and install it if using a new machine) or otherwise hunt around to get my work back.

  • I don’t want to schedule backups because my laptop does not keep schedules

    I can never guarantee where my powerbook is at any particular time of the day, so the idea of it running a backup schedule doesn’t really help. The week or so I tried it with rsync and iCal it failed more times that it succeeded because at the time it ran the machine was either closed up in its bag, or locked to a client’s desk.

So with these guidelines the real epiphany about backup approach came with a third realisation: hard disks are cheap. For not a lot of money you can have an external hard drive of an equivalent size to that inside your computer. And once your backup disk is as large as your source drive, why are you spending time choosing files or packaging the output into smaller space. Easiest option is just to copy the whole lot.

So that’s what I do now. Using SuperDuper I create a bootable clone of my entire powerbook drive. Whole process takes maybe 3 minutes (with SmartUpdate - more on that later). And being fast and easy means I don’t mind doing it regularly. It would probably be safer to run to a schedule but so far I’ve found that if I keep the process easy and fast I don’t need to schedule since I remember to do it and don’t mind doing it.

superduper

Using SuperDuper couldn’t be easier - well actually it could and I’ll explain how after - I just attached my firewire disk and run the application. It automatically selects my backup profile and after one-click starts working. A few minutes later it’s done and I can put the backup disk away until the next time.

One thing I found however is while SuperDuper is available in a free version, that missed a few functions that proved invaluable. Firstly the ability to select/de-select folders. When first using the program I had an old firewire drive that was slightly smaller than my powerbook hard disk. My solution was to backup everything on the disk except my iTunes library. That level of control you need to pay for.

The other feature that was great in the paid version was Smart Update. This basically speeds up the backup by only copying the file bits that need to be updated (eg gives you back one of the key features of rysnc that I was trying to get in the first place!). Without it the backup is pretty much all or nothing which makes it slower.

Tip: When I first setup my script I got SuperDuper to automatically reboot my powerbook from the backup to check it was OK. That worked fine, but then (of course) I needed to reboot the machine to get it back to booting from its internal drive. That’s far too many reboots for a mac to ever need to complete. So once confident the bootable clone was indeed clonable I turned that option off.

But notice not only did I make backups but I tested them! How rare is that - shows how easy it was with SuperDuper.

Things can only get better!

Already SuperDuper automatically selects my backup script, and after completing shuts itself down. To make the whole process completely non-involved what would be nice would be:

  • automatically start SuperDuper, and my backup script, when attached the backup disk. Guessing I can do something like this with Smart Folders….
  • automatically dismount the backup drive once the backup has been completed.

And if one day I end up with enough NAS to have backups happen online I can still use SuperDuper. Either by backing up to a dedicated partitiion in the attached drives, or by backing up to a disk image and storing that online. Few tweaks to my script and we’re done. SuperDuper even has inbuilt scheduling and scripting functionality to manage it all for me.

don’t like DRM? Say so today!

October 3rd, 2006

October 3rd is the Day Against DRMToday, October 3, is the international day against DRM.

If you’ve ever got annoyed that you cannot copy your CD to your PC (tick), or miffed that you cannot take a backup of your daughter’s favourite DVD (tick), or wanted to store that same DVD on your computer so she does not have to sit through a 10min movie world promotion each time she wants to watch it (tick), or wanted to watch a kids series not released in your own country (tick), then today is for you.

Follow the links and see what you can do to help fight this creeping menace.

Update: A video competition was run for snippets highlighting the issue. The winners have been announced and they are great. Worth a watch.