Have a look around for viewer.c. Ok I'll do it for you - click here

You need hijack too. With this you can browse the drectory structure and view any file (even non text) quite easily. It even reads /proc files which is kinda cool. Would be perfect for what you are trying to do.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)