Subject: (6.3) Safe way to edit the "active" file? |
---|
First of all, you could manipulate the active file using the ctlinnd "newgroup", "rmgroup" and "changegroup" commands. However, sometimes you just need to do a lot of editing all at once: The following sequence is the shortest: ctlinnd pause "edit active" [do something to the active file] inncheck ctlinnd reload active "edit active" ctlinnd go "edit active"Simple! No need to "flush" since the "pause" does that. > What if I need to delete 3000 lines from my active file?I would definitely edit the active file manually (using the above procedure). > What if I need to delete 10 lines from my active file?For a couple quick changes, I recommend using "ctlinnd". This is a little slow because all channels are closed and reopened after each "rmgroup", "newgroup", and "changegroup". However, it's easier than remembering the above sequence. DO NOT THROTTLE THE SERVER WHEN DOING MULTIPLE rmgroup COMMANDS. There is a bug in INN (all versions) that will shred your active file if you do multiple "rmgroup" messages while the server if throttled. This is a common mistake. People think the "rmgroup"'s will go faster if the server is throttled. It will go faster, it will also shred your active file. If you have a large number of groups to remove or create, you can use awk to write a script to do the work for you. % cat thelist alt.foo.bar alt.delete.me comp.sys.mac % awk <thelist '{ print "ctlinnd rmgroup " $1 }' ctlinnd rmgroup alt.foo.bar ctlinnd rmgroup alt.delete.me ctlinnd rmgroup comp.sys.macNow, you can either send the output of that to "| sh -x", or you can redirect the output to a file, and "source" the file. If you want to create a bunch of newsgroups, the awk command might be like this: % awk <thelist \ '{ print "ctlinnd newgroup " $1 " y user@host" }' | sh -xBe aware that news.daily also throttles the server at some time so verify the state of the server before doing ctlinnd {rm,new}group. ------------------------------ [Last Changed: $Date: 1997/07/01 01:25:41 $ $Revision: 2.21 $] [Copyright: 1997 Heiko Rupp, portions by Tom Limoncelli, Rich Salz, et al.] |