That part was missing some lines, so I decided to start over. This time, an AWK script is used:

        awk '
        /^fn unt[gb]z/ { p(); next; pr(); }
        /^fn df/ { pr(); next; pr(); }
        /^\.C$/ { pr() }
        function pr() { print NR, $0 }' hd.raw

untgz and untbz are functions that extract .tar.gz/.tgz and .tar.bz2/.tbz files automatically. df shows the disk usage. .C is the macro in my book for a chapter (one of the lines that was missing). I tell AWK to print the multi-line functions (with line numbers).

On Jan 11, 2008, at 3:47 PM, Pietro Gagliardi wrote:

I got that done and did a test run. I found a book I was working on! :-)

On Jan 11, 2008, at 3:01 PM, Pietro Gagliardi wrote:

I decided to stop doing this with Plan 9 and decided to do it from within Mac OS X. I'm running Plan 9 atop QEMU, which is implemented as a program called Q (http://www.kju-app.org/). The first step was to convert the compressed QCOW hard disk image to a raw one for analysis:

$ /Applications/Q.app/Contents/MacOS/qemu-img convert ~/Documents/ QEMU/Plan\ 9\ from\ Bell\ Labs.qvm/Harddisk_1.qcow2 -O raw ~/ Desktop/hd.raw

When that is done, I'll examine hd.raw in a text editor and get my files back.



Reply via email to