sourCEntral - mobile manpages

pdf

ARCHIVE

NAME

archive − Usenet article archiver

SYNOPSIS

archive [ −a archive ] [ −c ] [ −f ] [ −i index ] [ −p newsgroup-list ] [ −r ] [ input ]

DESCRIPTION

Archive makes copies of files specified on its standard input. It is normally run either as a channel feed under innd(8), or by a script before expire(8) is run.

Archive reads the named input file, or standard input if no file is given. The input is taken as a sequence of lines; blank lines and lines starting with a number sign (‘‘#’’) are ignored. All other lines should specify the token of an article to archive. Every article is retrieved from a token, and the Xref: header is used to determine the target file in the archive directory. You can limit the targets taken from the Xref: header with the ‘‘−p’’ option.

Files are copied to a directory within the archive directory, <patharchive in inn.conf>. The default is to create a hierarchy that mimics the input files; intermediate directories will be created as needed. For example, if the input token represents article 2211 in the newsgroup comp.sources.unix, archive will generate a copy in <patharchive in inn.conf>/comp/sources/unix/2211.

OPTIONS

−a archive

If the ‘‘−a’’ flag is used then its argument specifies the directory to archive in instead of <patharchive in inn.conf>.

−c

If the ‘‘−c’’ flag is used, then directory names will be flattened as if by the ‘‘−f’’ flag; additionally, all posts will be concatenated into a single file , appending if the file already exists, with the final component of the filename being YYYYMM based on the local execution time of archive. In this case, on December 14, 1998, the file would be copied to <patharchive in inn.conf>/comp.sources.unix/199812.

−f

If the ‘‘−f’’ flag is used, then all directory names will be flattened out, replacing the slashes with periods. In this case, the file would be copied to <patharchive in inn.conf>/comp.sources.unix/2211.

−i

If the ‘‘−i’’ flag is used, then archive will append one line to the specified index file for each article that it copies. This line will contain the destination name as well as the Message-ID and Subject headers.

−p newsgroup-list

Limits the targets taken from the Xref: header to the groups specified in newsgroup-list. The newsgroup-list is a comma-separated uwildmat(3) list of newsgroups you wish to have archive handle.

−r

By default, archive sets its standard error to <pathlog in inn.conf>/errlog. To suppress this redirection, use the ‘‘−r’’ flag.

EXIT STATUS

If the input is exhausted, archive will exit with a zero status. If an I/O error occures, it will try to spool its input, copying it to a file. If there was no input filename, the standard input will be copied to <pathoutgoing in inn.conf>/archive and the program will exit. If an input filename was given, a temporary file named input.bch (if input is an absolute pathname) or <pathoutgoing in inn.conf>/input.bch (if the filename does not begin with a slash) is created. Once the input is copied, archive will try to rename this temporary file to be the name of the input file, and then exit.

EXAMPLES

A typical newsfeeds(5) entry to archive most source newsgroups is as follows:

source-archive\

:!*,*sources*,!*wanted*,!*.d\

:Tc,Wn\

:<pathbin in inn.conf>/archive −f −i \

<patharchive in inn.conf>/INDEX

HISTORY

Written by Rich $alz <rsalz AT uunet DOT uu DOT net> for InterNetNews. This is revision 5909, dated 2002-12-03.

SEE ALSO

inn.conf(5), newsfeeds(5).

pdf