www.neurozen.com
   The Official Rich Rosen Website

The expire(8) man page

In the mid-1980s, the UNIX® manual page for the "expire" command, normally used for expunging old articles from a netnews server, contained directions on how to use this command to delete all of the postings from a particular user.

The email address given as an example of how to do this was... mine.

Eventually language was added indicating that the command was not intended as a tool for censorship, but nonetheless it was interesting to see such an overt example of how to use this command for that very purpose using my address.

The following is a reconstruction of this page as it existed in UNIX printed and online manuals through the late-1980s, with the reference to my address highlighted for your amusement.

EXPIRE (8)

NAME

expire - remove outdated news articles

SYNOPSIS

expire [ -n newsgroups ] [ -i ] [ -I ] [ -a ] [ -v level ] [ -p ] [ -h ] [ -r ] [ -e days ] [ -E days ]
expire -f
user@site.DOMAIN
expire -u

DESCRIPTION

Expire 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 find(1) or rm(1), because of the history file. If you just delete messages, then the history file will become incorrect because it will show that they are still there.
The normal use of expire is to run it at regular intervals with no options. It will remove all articles whose expiration date have 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 time that it takes to run depends, of course, on many factors; on a VAX 11/750 with a 15-day expiration period and the volume of news that is typical in 1986 (about 5000 articles per week), expire will take roughly an hour to run.
Expire has the following options:
-n
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 talk.origins, leaving everything else alone, type this:
       expire -n talk.origins
To expire only the articles in comp.os, but leave comp.os.eunice and comp.os.cpm alone, type this:
       expire -n comp.os !comp.os.eunice !comp.os.cpm
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.
       expire -n comp.os,!comp.os.eunice,!comp.os.cpm
If you have certain groups that you use as archives, which should never have their articles expired, you must construct an expire command that mentions all groups except your archive groups. When doing this, be sure not to forget the groups ``junk'', ``control'', and ``general''. A likely command would be:
       expire -n all,!local.source,!all.sources

-e
Specify an expiration period. Normally expire 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
       expire -e 5
If you would like it to remove articles from talk.religion.misc and talk.politics.misc that are older than 23 days, and leave everything else alone, you can type
       expire -e 23 -n talk.religion.misc talk.politics.misc
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.
-E
Normally expire 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 command
       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.
-a
Asks that articles be archived (usually in /usr/spool/oldnews) instead of being deleted. An example of its use would be
       expire -a all.sources,!comp.sources.bugs
-a may be used with -n. If no pattern is given for -a, all newsgroups specified by -n will be archived.
-I
instructs expire 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.
-i
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 those has passed.
-v
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 expire to print every possible message.
-p
causes expire 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 ``time warp'' that causes a batch of very very old news to be dumped onto the network; judicious use of the -p option can eradicate it.
-f
asks expire to remove messages sent by a particular user, regardless of the newsgroup that they are in, and regardless of how old they are. An example of its use is
       expire -f rlr@pyuxd.UUCP
Any article whose From: field exactly matches the argument to the -f option will be removed.
-h
causes expire to ignore the history file, and do its expiration by looking at every article file in the spool directory. This is phenomenally slow--it can take 5 or 6 hours on an otherwise idle VAX 11/750--but if your history file is damaged and you cannot use find(1) because you are relying on expiration dates stored inside articles, then you have no other choice.
-r
causes expire 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 dbm(3X) 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
       expire -r -I -e 999999 -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 {} ;
       /usr/lib/news/expire -r
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.
-u
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.

SEE ALSO

inews(8), postnews(1), getdate(3), news(5), recnews(8), sendnews(8), uurec(8)

BUGS

The newsgroup pattern argument to the -n option is limited to 1024 characters, which is about 8 lines of text.

Brought to you by neurozen.com
© 2003 -