ARCHIVE(8) | System Manager's Manual | ARCHIVE(8) |
archive - Usenet article archiver
archive [ -a archive ] [ -f ] [ -i index ] [ -m ] [ -r ] [ input ]
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 set of lines. Blank lines and lines starting with a number sign (``#'') are ignored. All other lines should specify the name of a file to archive. If a filename is not an absolute pathname, it is taken to be relative to /var/spool/news.
Files are copied to a directory within the archive directory, /var/spool/news/news.archive. The default is to create a hierarchy that mimics the input files; intermediate directories will be created as needed. For example, the input file comp/sources/unix/2211 (article 2211 in the newsgroup comp.sources.unix) will be copied to /var/spool/news/news.archive/comp/sources/unix/2211.
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 /var/spool/news/out.going/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 /var/spool/news/out.going/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.
A typical newsfeeds(5) entry to archive most source newsgroups is as follows:
source-archive\ :!*,*sources*,!*wanted*,!*.d\ :Tc,Wn\ :/usr/lib/news/bin/archive -f -i \ /usr/spool/news/news.archive/INDEX
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.14, dated 1996/10/29.