Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site floyd.UUCP Path: utzoo!linus!decvax!harpo!gummo!whuxlb!floyd!trb From: trb@floyd.UUCP (Andy Tannenbaum) Newsgroups: net.news Subject: undocumented feature for saving netnews Message-ID: <1968@floyd.UUCP> Date: Wed, 14-Sep-83 17:59:18 EDT Article-I.D.: floyd.1968 Posted: Wed Sep 14 17:59:18 1983 Date-Received: Thu, 15-Sep-83 06:04:16 EDT Organization: Bell Labs, Whippany, NJ Lines: 29 If you save a lot of netnews, your $NEWSDIR directory probably gets pretty large. You probably wish that there was a way to sort all those files into appropriate subdirectories. Wish no more. There is an undocumented feature in netnews (since at least 2.10.1) which sorts your saved netnews by newsgroup. Here's how it works: I set my NEWSDIR environment variable to ~trb/newsdir/%s. Netnews replaces the %s with the current newsgroup for the message using sprintf, which is cute, because if you don't have a %s in your NEWSDIR variable then sprintf doesn't mind. This way, when I'm reading net.cooks, and I save an article in the file called souffle, it saves it in /usr/trb/newsdir/net.cooks/souffle. Note that netnews will not create the directory for you. If the save fails, you can do a !mkdir and try again. For starters, it's useful to get a list of all active newsgroups and do a mkdir `cat activelist`. You can make activelist by stripping the article numbers out of /usr/lib/news/active. Note that the hierarchy is like old style news, the net.cooks articles will go into net.cooks/souffle, not net/cooks/souffle. This works in vnews (if the vnews is compiled with the .o's from a late model netnews) but it doesn't work with the 2.10.1 digestifier, though that would be easily fixed. Andy Tannenbaum Bell Labs Whippany, NJ (201) 386-6491