trb@floyd.UUCP (Andy Tannenbaum) (09/15/83)
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
trb@floyd.UUCP (Andy Tannenbaum) (09/15/83)
The environment variable for saving news in a direcory is called NEWSBOX, not NEWSDIR. Sorry for the bad info. NEWSBOX=dir/%s does work. Andy Tannenbaum Bell Labs Whippany, NJ (201) 386-6491
lda@clyde.UUCP (Larry D. Auton) (09/16/83)
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. If you don't read all the newsgroups, you can save a bit of room by using only the groups in your .newsrc that are followed by ':', rather than using /usr/lib/news/active, for "starters". This could save you lots of empty (as well as unused) directories. P.S. THANKS ANDY!!! Larry Auton WECo BTL-WH (201)386-4272