Changi NNTP Server 1.0
[
Bottom of Page |
Previous Page |
Next Page |
Table of Contents ]
EXPIRE.EXE
Command Line Options
As the term options implies, all options are optional.
Expire will run fine without any,
but may not do what you expected it to do and, for sure, will
not do it the best way. One routine I'd suggest is to use option
-C for a daily run immediately before retrieving new articles
and run without -C but with option -E weekly.
Call the program with options -? to get a usage help:
usage: expire [options] [newsgroups]
newsgroups is a comma separated list of groups, which may
include '!', '*', '?' and '[...]'
options:
-c<fname> control file -a rebuild active
-d<dflags> logging flags -A create active
-E<time> remember time -b remove bad arts
-e<time> expire time -C cancel expired articles
-q<lines> max bad lines -h ignore history
-R<reason> define reason -i ignore expire lines
-s<call> sort program -L with low priority
-S<fname> summary file -M use last write
-t<dir> temp directory -p use posting date
-u<user> user name -r rebuild
-w<time> time warp -T sort active
-x<xflags> exclusion flags -U old index
-z<fname> use zapfile -V verify history only
-v verbose
logging flags: exclusion flags:
a log active update a no active update
e log expiration h no history update
h log history r no directory remove
o log to console S exclude size
p add pid to log s no server control
t test mode T exclude time
Rebuilding Options
- -a
- Rebuilds the active file. Before starting the expiration
process, and after reading an existing
active file, Expire will
scan the news directory. If it finds any subdirectory containing
article files without a corresponding newsgroup in the
active file, the new newsgroup will be
added.
- -A
- Creates a new active file overwriting an existing one. This
option will force expire to ignore any existing
active file. The program will scan the
news directory for subdirectories containing article files and
create all corresponding newsgroups. The list of groups will be
written to a new active file.
Be aware that this will silently override any existing
active file and remove newsgroups without
currently stored articles.
- -b
- Removes bad articles. When rebuilding the
history, Expire needs to read each article
header. Articles with incomplete headers and articles that are
corrupted otherwise are normally ignored. Setting this option
will remove them.
- -h
- Ignores history. With this option set expire will ignore an existing
history file and scan the newsbase using the
active file. Any existing
history file will be overwritten.
This is useful when the
filesystem does not have sufficient space to hold both the old
and new history files. Be prepared.
Expire needs much more time to run when this option is given.
- -M
- When rebuilding the history, Expire will use the creation
date of an article file to determine the date the article had
been received. Use this option to force Expire to use the
last modification date instead.
- -r
-
- This option implies option -h. Expire will ignore any
existing history, but rebuild a new
one from scratch by scanning the news directory. You shouldn't
use this option unless you need to. Disadvantages are, that
Expire spends much more time to process and that all remembered
message-IDs of previously expired articles are lost.
Expiration Time Options
- -cfilename
- Sets the name of the expire configuration file. By default expire
will look for a file named expire.conf in the current directory and
will not worry if this file doesn't exist, but simply apply the default
expiration time on all groups. This option may define a different
filename and force Expire to terminate if it couldn't read this file.
See the chapter about expire.conf for the
required contents of this file.
- -etime
- Defines the expiration age of an article. Articles older than
the given time period will be removed, unless an explicit expiration
line in the article's header defines a later date. Use numbers followed
by an optional unit character (h=hours, d=days, w=weeks) to
specify this time. Without explicit unit characters, days are
assumed. The default is 7d.
- -Etime
- Removing articles is one thing, removing IDs from the
history
is another. It's a good idea to keep the messages-IDs for some
time in the history after the article
has been removed. This
will help to avoid duplicates. Use numbers followed by an
optional unit character (h=hours, d=days, w=weeks) to specify
this time. Without explicit unit characters, days are assumed.
To remove articles older than 7 days and keep IDs of expired
articles seven more days, call
expire -e1w -E2w
By default, all IDs of expired articles are immediately removed
from the history as well.
This option is ignored in conjunction with option -C.
- -i
- Ignore explicit expiration date. To some articles, especially
regular postings like FAQs, a special header line is added to define
an explicit expiration date. By default expire will honor this date,
but, with this option set, the program ignores it.
- -wtime
- Defines time warp. Use numbers followed by an optional unit
character (h=hours, d=days, w=weeks) to specify this time. Without
explicit unit character, days are assumed. You may define a positive
or negative time offset of the current local time. For example,
giving -w-8h makes expire think it's running eight hours earlier
than the actual time. So all articles will become eight hours
younger than they really are and expire may remove less articles
than it would have done without this option.
Mode Options
- -C
- If this option is given, expire will not remove entries from
the history file. Instead expired articles
will be marked canceled, which saves expire from rebuilding the
history index.
This is a good option for daily expiration, but you should
not forget to run the program from time to time without this
option in order to get rid of outdated history entires.
- -L
- Runs the program with low priority.
- -p
- Use posting date instead of arrival date. By default expire
will use the article's date of arrival to determine its age. This
option forces expire to use the posting date.
- -qnumber
- Quit after specified number of errors. Normally expire will ignore corrupted article files or bad
history entries. This option will quit expire if the specified
number of those kind of problems occured.
- -U
- Create UUPC compatible history index. Starting with version 0.9p
Changi used a new history index format to speed up processing and
save diskspace. This option makes expire work with previous releases
and UUPC/extended.
- -V
- Use this option to verify the consistency of an existing
history file. If this option is given on the command line, no
expiration and no rebuilding is performed and all related options
are ignored.
- -xa
- Do not update the active file. If this option is set, expire will
leave the active file unchanged.
- -xh
- Do not update the history. This option forces expire not to update the
history files.
- -xs
- Do not flush or pause Changi server. Ususally Expire tries to first
flush and later pause the local Changi server when it needs
exclusive access to the history or
active file. After finishing
with the locked files expire will send a go command to the server.
With this option set, expire will not send any command to the
server.
- -xS
- Exclude size from history. By default expire adds the article's
size as the third field in the history file.
If you're using software other than Changi
to read your news on the local machine, you may try this option
to avoid incompatibility with Changi's default layout of the
history.
- -xT
- Exclude additional time subfields from history. Expire adds
two additional time subfields to history entries,
the articel's expiration and posting date, which are separated
with the tilde character. These fields help expire to significantly
speed up the expiration process.
However, this may create compatibility problems with other
news software you're using. This options forces expire not to
add these additional subfields.
- -zfilename
- Create zapfile, do not delete articles. This option tells expire
not to remove expired articles but to write the filenames with a 'DEL'
command in front to a batch file. This file may be run later to
finally delete outdated articles.
Debugging Options
For debug output Expire uses a local
syslog daemon not included in this
distribution. Syslog is part of IBM's
TCP/IP base product and
also available as freeware, ported by Jochen Friedrich.
- -da
- Active file updates are logged.
- -de
- Turns excessive logging on. This option is used for
tracing problems.
- -dt
- Let the program run in testmode. All actions are performed
like they are in normal mode, but no articles will be removed
and no active file
or history update takes place.
- -do
- By default you need any syslog daemon
to view and/or store logged messages. This option will output them
on the console using the standard error channel. Here's an example on how
to redirect this output to a file:
expire -do 2>mylog
- -dp
- Adds the current process id to logged messages.
Miscellaneous Options
- -Rreason
- Defines textual reason to flush and pause server. Expire
tries to pause the local Changi server when it needs exclusive
access to the history file,
using Expiring as the reason. Use this option to give
a different reason.
Example:
expire -R"Expiring outdated articles"
- -uuser-id
- You must use this option unless you set either the
USER or
CHANGILOGNAME
environment variable.
- -sprogramcall
- Sort program to call. By default expire calls
exsort +1n > and feeds history lines
to its standard input. Note that Expire will append the name
of the sorted target file.
- -Sfilename
- Add summary to specified file. If this option is given,
expire will add a line at the end of the given file when successfully
completed. The line contains seven space separated fields.
- Time of starting expire (number of seconds since 1/1/1970)
- Article lines processed
- Articles retained
- Entries expired
- Files deleted
- Old entries dropped
- Old entries retained
- -tdirectory
- Use for temporary files. Expire uses a special directory for temporary files. The program
checks several environment variables and uses the first one it
finds. The names checked are
CHANGITEMPDIR and
TMP, in this
sequence. If none was found, the current directory is used. The
default behaviour may be overridden by this option.
- -T
- This option is not used anymore. Expire will sort the entries
int the active file by default.
- -v
- Verbose output. Displays progress information during expiration.
The output is sent to the standard error channel and may interfere with
option '-do'.
[
Top of Page |
Previous Page |
Next Page |
Table of Contents ]