trb@masscomp.UUCP (Andy Tannenbaum) (05/26/84)
On our VAX 750 4.1C, vnews core dumps when you type crap to the N command and try to break out with INTR. I haven't investigated the bug cuz the sources aren't lying around here, but if ever you get booted out of vnews with a core dump after a few hours and you want to recover your .newsrc, here's how to do it! (Welcome to kludge of the century.) Key thing is that the .newsrc lines are stored in core in the same format that they're stored on disk. First, get the useful strings out of the core image: % strings core | see > foo "Strings" gets printable ascii strings out of a file. Fine piece of work, comes with 4bsd. "See" makes sure that you can vi the file. See is cat -v, I didn't want ickey!rob to complain. Now, edit the file and look for the string: net.general: (Assuming you read net.general). Make sure you put the colon after! There is an area that looks like a .newsrc but with no colons, I suspect it's a list of "last article in newsgroup" or something. Don't be fooled by cheap substitutes, demand the colon! Now, walk backward to what looks like the top of the .newsrc file, and delete the cruft before it. Walk to what looks like the end and delete the cruft after. You might have some short lines of garbage characters within the .newsrc data, delete those lines, it's ok. What's left should have the same number of lines as your old .newsrc (check with wc). Diff them and eyeball them, I think you'll find that you've regenerated your .newsrc. (I just figured this out after just having spent a good deal of time reading news and then getting booted out.) If this comes in handy, good. If not, I hope you at least find it amusing. Andy Tannenbaum Masscomp Inc Westford MA (617) 692-6200 x274
ab3@stat-l (Rsk the Wombat) (05/30/84)
Checking back in the dusty directories of past abuse, I find the following script: strings core | egrep "^((fa)|(general)|(junk)|(net)|(test)|(to)).*[:!] [0-9]*" This does a fair job of recovering your .newsrc; to check on how well it did, pipe its output through sort(1) and diff it with the output of "sort ~/.newsrc". -- Rsk the Wombat UUCP: { allegra, decvax, ihnp4, harpo, teklabs, ucbvax } !pur-ee!rsk { cornell, eagle, hplabs, ittvax, lanl-a, ncrday } !purdue!rsk