This article is from the Singles FAQ, by Trygve Lode tlode@nyx.net with numerous contributions by others.
Most newsreaders have a provision for "killing" messages; that
is, marking them as read before you get to them, so your
newsreader then skips over them automatically instead of
showing them to you. I'm going to discuss how to do this in rn
and its derivatives (trn, etc.) but most other newsreaders
should have similar capabilities (though the command syntax
won't necessarily be identical). Topics are the easiest things
to kill, as you need only type the 'k' key and all subsequent
messages with that topic will be marked as read; you can also
kill things in more complex ways by typing in a "regular
expression" followed by ":j", telling the newsreader to "junk"
(mark as read) all the articles that match that regular
expression. Remember, you still can read the messages that have
been marked as read if you want to, either by typing in the
message number or by using the 'N' and 'P' commands to move to
the next and previous messages rather than the 'n' and 'p'
commands.
A regular expression normally consists of a pair of '/'s with a
pattern you'd like to match in the middle. For example, if you
wanted to kill all messages whose topics included the word
"banana" you could type in "/banana/:j" and hit a return (and
it would list the numbers of the articles that were being
junked--the topics "BananaSizeWar" and "vegemite and banana
delight; mmmm-mmm" would be junked. The default is to check
just the topic line and not differentiate between upper- and
lower-case letters; that is, it wouldn't matter whether the
topic had the word "banana" or "bAnAnA" in it. If you want it
to be case sensitive and select "bAnAnA" but not "Banana", a
'c' should be placed after the trailing slash: "/bAnAnA/c:j".
You can also have your newsreader check more than just the
topic line--adding an 'h' after the trailing slash makes the
newsreader check the entire header (allowing you to kill
messages by a given author and/or from a particular site) and
adding an 'a' will check the whole article; thus,
"/grunting/a:j" would mark every article containing the word
"grunting" as read. (And, of course, this may be combined with
the 'c' option so that "/Grunting/ca:j" would kill off only
those articles in which "Grunting" is capitalized.)
You can also type in an expression like this without the ":j"
at the end, in which case it will simply locate and display the
article that matches the pattern. Using question marks ("?")
instead of slashes will make it search backwards instead of
forwards and the "r" option makes it scan articles that you've
already read. Thus, if you were trying to find the article in
which somebody mentioned something about the use of badger dung
as an aphrodesiac, you could type in "?badger dung?ar" for it
to search all preceding articles for a mention of badger dung;
if you want it to mark all the articles that mention badger
dung as unread, you can type in "?badger dung?ar:m"
Kill commands like those above may be placed in a file where
they will be performed automatically when you read a group.
This file goes in a directory off your News directory
corresponding to the group name and the default name for this
file is KILL (note capitals). Thus, the killfile for
soc.singles would be
[your home directory]/News/soc/singles/KILL
Hitting a 'K' will not only kill the topic you're reading, but
also add a command to kill that topic in future sessions to
your killfile for that group, creating it if it doesn't exist,
even creating the directories to put it in if necessary. While
this is the easiest way to add to a killfile, it is also
generally the least useful, since most topics do die or change
after a while, but unless you edit that line out of your
killfile, it will continue to live in there, eating up
processor time and generally slowing everything down whenever
you read that group. In general, keeping your killfiles to a
minimum is a good approach, especially if you are sharing a
computer with other users who don't like the system bogging
down any more than you do.
A few examples:
killing messages from beavis@butthead.edu:
/^From: *beavis@butthead\.edu/h:j
killing messages cross-posted from alt.boring.prattle:
/^Newsgroups:.*alt\.boring\.prattle/h:j
killing messages crossposted to three or more groups:
/^Newsgroups:.*,.*,/h:j
killing all messages that even mention hairballs:
/hairballs/a:j
You'll notice that I used a few strange characters up there:
these are characters that have special meaning when used in an
expression like one of these: '^' indicates the beginning of a
line so that the first example will only consider lines that
begin with "from:"; '.' is a single-character wildcard that
will match any character (that's why when we really want a '.',
we have to precede it with a '\' as we've done in the above
examples); and '*' means that the pattern should match an
arbitrary number of characters matching the character
immediately before it in the expression (in the first example,
you can see that we use it to allow there to be an arbitrary
number of spaces between "From:" and "beavis" and in the second
example, we've used it after the '.' wildcard so that there can
be an arbitrary number of characters of any kind between
"Newsgroups:" and "alt"). More about regular expressions and
killfiles can be found by typing "man rn" and "man ed" at your
Unix prompt.
 
Continue to: