Jump to content

DearDiary.2003-11-12

From WikiWorld

DearDiary,

Friday we lost the main disk partician on synergy, our main office server. I've been working like a madman since then trying to recover our files.

Everyone said is was impossible, but, being a unix god, I thought I could do it. No luck, IamAnAsshole and all the hair fell off my face....

http://xanthus.net/jim/images/nobeard.jpg

Actually, Charlotte made me take it off, but now she won't speak to me until it grows back.

I did get 7 gigs of text off it with a little c program I wrote and we found in it many of the most important program source code that was lost. The experts tell me this is the best that can be done. Much of my effort was fruitless. The UFS freebsd file system lost its partician information and sysinstall ran a mkfs when we recreated it wiping out all the inodes. Here is the code if anyone needs it.

cat lines.c
#include <stdio.h>
main(){
        char line[1000],*p,c;
        char * e=line+999;
        int i=0;
        p=line;
        while ( c=getchar(), !feof(stdin) ) {
                if ( isprint(c) || c=='\t' || c=='\n' ) {
                        *p++=c;
                        if ( p >=e ) p=line;
                        if ( c=='\n' ) {
                                *p=0; i++;
                                if ( i > 2 ) {
                                        printf("%s",line);
                                        p=line;
                                }
                        }
                } else {
                        p=line; i=0;
                }
        }
}

Who are you? --KenSchry

LOL, I don't know the guy in the mirror anymore either, -- JimScarver