ARCHIVED: In trn, how do I edit my kill file?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

To edit your global kill file, open a session of trn. At the newsgroup selection level (the top level in trn), press Ctrl-k. Similarly, to edit the kill file for a specific newsgroup, go into that newsgroup and press Ctrl-k. Once you've done this, trn will open your kill file in your default editor.

The first line of your kill file will probably look like this:

  THRU = home/dvader/KILL NNNN

NNNN is the number of the last article trn has read, and indicates that it will not process articles with lower numbers. Following this line will be the names of threads, people, subjects, etc., that you have added to your kill file.

If you are just creating your kill file, this is where you will enter the patterns for which you want the kill file to search. Your kill file entries should be formatted like this:

  /patterns/modifiers:command

Patterns

The pattern portion of the kill file entry could be the title of a thread, a person's username, or even a single word.

Note: If the pattern is an email address or otherwise has a period in it, then before every period you must place a \ (backslash). For example, if you want to kill every post from jdoe@what.an.idiot.com, the kill file entry would be:

  /jdoe@what\.an\.idiot\.com/h:j

You will also need to use a backslash in front of these characters:

  * / [ \

Finally, if your pattern has a ^ (caret) at the beginning or a $ (dollar sign) at the end, you must precede these characters with a backslash in order to force trn to interpret the character as the character itself, rather than as a command.

If you add a caret without a preceding backslash at the beginning of your pattern, trn will only look at the beginning of a line for the pattern. Similarly, if you add a dollar sign without a preceding backslash at the end of your pattern, trn will only look at the end of a line for your pattern.

For example, if you want to kill all articles that have "AOL" at the beginning of their subject line, then your kill file entry should be:

  /^AOL/:j

Modifiers

Modifiers tell trn where and how to look for the pattern. If you don't specify any modifiers, trn will only look in the subject line for your pattern. Here are some of the more useful modifiers:

a:
Looks through the entire article for your pattern

Note: If you have a large kill file or are in a newsgroup with long articles, this option will cause trn to take a very long time to process your kill file.

h:
Looks through the header for your pattern
f:
Looks at only the "From:" line in the header
H[header]:
Lets you select a specific header for trn to search (e.g., Hnewsgroups, Hpath, Horganization)
c:
Tells trn to be case sensitive when it processes the pattern

Commands

Commands tell trn what to do with articles once they have been targeted. Some useful commands are:

j Mark the article as read.
m Mark the article as unread.
=
Show the subject line of the article.
+ Select the article.
Tj
Kill the article and any other articles in the same thread.
,
Kill the article and any of its followups.

Examples

If you want to kill all articles that are cross-posted to a certain newsgroup, say talk.politics.guns, then your kill file entry should look like:

  /talk\.politics\.guns/Hnewsgroups:j

If you want to kill all threads where there is an article that has the word "olympics" in the subject line, then your kill file entry should look like:

  /olympics/:Tj

For more information about kill files in trn, see the "rn KILL file FAQ" at:

  http://www.faqs.org/faqs/killfile-faq/

This is document acmn in the Knowledge Base.
Last modified on 2018-01-18 10:38:19.