.TH EXPIRE 8 "February 14, 1986"
expire \- remove outdated news articles
.BR /usr/lib/news/expire " [ " \-n
.BR \-i " ] [ " \-I " ] ["
.BI \-f " user@site.DOMAIN"
is the program that removes out-of-date news articles from your system.
You need to use a special program to do this, instead of just using
because of the history file. If you just delete messages, then the history
file will become incorrect because it will think that they are still there.
is to run it at regular intervals with no options.
It will remove all articles whose expiration date has passed.
If you have a lot of disk space, you can run it once a week. If disk space is
tight, you might want to run it every night. The length of time that it takes
to run depends, of course, on many factors; on a VAX 750 with a 15-day
expiration period and the volume of news that is typical in 1986 (about 5000
will take roughly an hour to run.
has the following options:
Specify certain newsgroups whose articles will be expired. The other
newsgroups will be left alone. The notation that you use with the \-n option
is quite similar to that used in the sys file. To expire only the articles in
net.origins, leaving everything else alone, type this:
/usr/lib/news/expire \-n net.origins
To expire only the articles in net.micro, but leave net.micro.pc and
net.micro.mac alone, type this:
/usr/lib/news/expire \-n net.micro !net.micro.mac !net.micro.pc
For compatibility with the syntax of the sys file, you can also type the
command this way, with commas instead of spaces between the fields.
/usr/lib/news/expire \-n net.micro,!net.micro.mac,!net.micro.pc
If you have certain groups that you use as archives, which should never have
their articles expired, you must construct an
command that mentions all groups except your archive groups. When doing this,
be sure not to forget the groups
A likely command would be:
/usr/lib/news/expire \-n all,!local.source,!mod.sources
Specify an expiration period. Normally
removes articles that are older than 15 days. If you would like it to remove
articles that are older than 5 days, you can type
/usr/lib/news/expire \-e 5
If you would like it to remove articles from net.religion and net.politics
23 days, and leave everything else alone, you can type
/usr/lib/news/expire \-e 23 \-n net.religion net.politics
You can specify the \-e option as \-e15 instead of as \-e\ 15 if you want;
this is for compatibility with old versions and old habits.
removes the record of an article from the history file at the same time it
removes the article. One of the purposes of the history file is to prevent
articles from being duplicated if a second copy arrives a while later,
perhaps over some other path. If your site is extremely short on disk space,
forcing you to specify a short expiration period in the \-e option, you can
use the \-E option to ask that the information in the history file be kept
round a bit longer, until the danger of duplicate arrival has passed. The
/usr/lib/news/expire \-e 7 \-E 21
Causes articles that are 7 or more days old to be removed, and history
information that is 21 or more days old to be removed. If you use the \-E
option, make sure that the value it specifies is always larger than the \-e
option value, else you will end up with articles that are not in the history
file; this can cause problems.
Asks that articles be archived (usually in /usr/spool/oldnews) instead of being deleted.
An example of its use would be
/usr/lib/news/expire \-e 30 \-a net.sources,mod.sources,!net.sources.bugs
If no pattern is given for
all newsgroups specified by
to ignore expiration dates stored in articles, and to look at the number of
days that have passed since the article was received. Not very many articles
have expiration dates in them.
is like \-I, but it will look at the number of days that have passed and also
at the explicit expiration date, and it will remove the article if either of
sets the verbosity mode. If you have specified a complex collection of
options and they are not having the effect that you would like, then set \-v2
or \-v3 to find out what is going on. Values from 0 to 6 are meaningful, and
\-v1 is the default. \-v0 will turn off messages, and \-v6 will cause
to print every possible message.
to use the date the article was posted, rather than the date it arrived at
your machine, as the basis for expiration. Every now and then there is a
that causes a batch of very very old news to be dumped onto the
network; judicious use of the \-p option can eradicate it.
to remove messages sent by a particular user, regardless of the newsgroup
that they are in, and regardless of how old they are.
This option is intended not so much to selectively censor
voluminous posters (though it has certainly been used for that) but to
site (running different news software) accidentally releases a duplicate
batch of old news. An example of its use is
/usr/lib/news/expire \-f rlr@pyuxd.UUCP
Any article whose From: field exactly matches the argument to the \-f option
to ignore the history file, and do its expiration by looking at every article
file in the spool directory. This is phenomenally slow\(emit can take 5 or 6
hours on an otherwise idle Vax 750\(embut if your history file is damaged and
because you are relying on expiration dates stored inside articles, then you
to rebuild the history file in addition to doing expiration. The \-r option
implies the \-h option; it scans every article in the spool directory and
builds a new set of history and
files. It also performs expiration, so if you want to rebuild the history
file while preserving all articles (as you might want to do on an archival
file computer), you must specify
/usr/lib/news/expire \-r \-I \-e 999999
to prevent expiration from taking place.
If you do not rely on expiration dates stored inside articles, it is a good
tonic to run the following sequence of commands once every now and then:
find /usr/spool/news \-size 0 \-o \-mtime +90 \-exec rm \-f {} \;
This will remove junk files that have somehow managed to find their way into
the spooling directory, and then it will rebuild the history file.
causes the minimum article-number field in the active file to be updated.
This is used when converting from 2.10.1 news to later versions.
is running, it can cause the article that inews is trying to insert to be
absent from your history file. There is no automatic interlock between
so you must take care to turn off
is running. This bug will likely be fixed soon, but for the moment be careful
The newsgroup pattern argument to the \-n option is limited to 1024
characters, which is about 8 lines of text.